Hi all,
I searched in the forum, but couldn't find an answer.
It looks like that ifwinactive doesn't support wildcards.
What would I have to do to get something equivalent to
#ifwinactive ahk_class *WindowClass (wild cards)
or
#ifwinactive ahk_class .*WindowClass (regexp)
I would be very happy about any pointer!
IfWinActive and wild cards
Started by
Guest
, Apr 28 2009 08:31 AM
8 replies to this topic
#1
-
Posted 28 April 2009 - 08:31 AM
Thanks for the pointer! I overlooked that!
I tried it now, but it doesn't work in my case. I guess this the same problem that Rexx has with his script!
<!-- m -->http://www.autohotke...ic14641-60.html<!-- m -->
I tried it now, but it doesn't work in my case. I guess this the same problem that Rexx has with his script!
<!-- m -->http://www.autohotke...ic14641-60.html<!-- m -->
#3
-
Posted 28 April 2009 - 09:29 AM
As long as you won't provide your code, you might wait forever to be supported :roll:This command affects the behavior of all windowing commands, e.g. IfWinExist and WinActivate.
#4
-
Posted 28 April 2009 - 09:33 AM
Thanks and sorry :-) The code is actually
The class could be prefixed with "Sandbox:DefaultBox:". For example The
Au3 Window Spy would show "Sandbox:DefaultBox:IEFrame" as class. The prefix can be variable.
No idea, why the code doesn't work. Any ideas?
SetTitleMatchMode, RegEx #IfWinActive ahk_class .*MozillaUIWindowClass XButton1::Send ^{Click} #IfWinActive ahk_class .*IEFrame XButton1::Send ^{Click}But it doesn't work with Sandboxie eindows.
The class could be prefixed with "Sandbox:DefaultBox:". For example The
Au3 Window Spy would show "Sandbox:DefaultBox:IEFrame" as class. The prefix can be variable.
No idea, why the code doesn't work. Any ideas?
#5
-
Posted 28 April 2009 - 10:23 AM
Sorry, I mean to say:
But it doesn't work with Sandboxie windows.
But it doesn't work with Sandboxie windows.
#6
-
Posted 28 April 2009 - 09:10 PM
I guess nobody has an idea why this doesn't work?
Probably Sandboxie is not that popular yet, but I recommend it highly. It's is freeware and a small download ... It is very useful to protect your system from malware (especially if you like to download small utilities, scripts, but are not sure whether the sources is trustworthy).
<!-- m -->http://sandboxie.com<!-- m -->
I guess the problem with sandboxie is that all "sandboxed" applications have a prefix in the class identifier. Unfortunately autohotkey is not able to deal with this (but au3 apparently can).
Probably Sandboxie is not that popular yet, but I recommend it highly. It's is freeware and a small download ... It is very useful to protect your system from malware (especially if you like to download small utilities, scripts, but are not sure whether the sources is trustworthy).
<!-- m -->http://sandboxie.com<!-- m -->
I guess the problem with sandboxie is that all "sandboxed" applications have a prefix in the class identifier. Unfortunately autohotkey is not able to deal with this (but au3 apparently can).
#7
-
Posted 29 April 2009 - 10:49 PM
Why do you need wildcard?
If you need wildcard, please show ahk_class for window that does not work using RegEx.
#IfWinActive ahk_class MozillaUIWindowClass XButton1::Send ^{Click} #IfWinActive #IfWinActive ahk_class IEFrame XButton1::Send ^{Click} #IfWinActive
If you need wildcard, please show ahk_class for window that does not work using RegEx.
#8
-
Posted 30 April 2009 - 01:34 PM
#IfWinActive ahk_class .*MozillaUIWindowClass
Try this:
#IfWinActive ahk_class (?:Sandbox:(?:\w+)Box:)?MozillaUIWindowClass
If that doesn't work you can always specify a group in the auto-execute portion of your script with the two different types of ahk classes and put both types into the group:
GroupAdd, FirefoxClass, ahk_class MozillaUIWindowClass GroupAdd, FirefoxClass, ahk_class [color=brown]<< Sandboxie prefix >>[/color]MozillaUIWindowClass
Then just use ahk_group FirefoxClass (or whatever name you give to the group) for the WinTitle.
#9
-
Posted 30 April 2009 - 01:58 PM