| View previous topic :: View next topic |
| Author |
Message |
magarocule
Joined: 20 Oct 2009 Posts: 8
|
Posted: Thu Nov 26, 2009 2:15 am Post subject: IfWinActive with multiple windows as parameter |
|
|
IfWinActive with multiple windows as parameter?
eg.
| Code: | #IfWinActive, ahk_class Type1 Type2 Type3
!1::
do stuff
return |
|
|
| Back to top |
|
 |
i3egohan
Joined: 18 Jul 2006 Posts: 403
|
Posted: Thu Nov 26, 2009 2:33 am Post subject: |
|
|
Use a loop?...
| Code: | types = type1:type2:type3
Loop, Parse, types, :
; code |
|
|
| Back to top |
|
 |
magarocule
Joined: 20 Oct 2009 Posts: 8
|
Posted: Thu Nov 26, 2009 3:11 am Post subject: |
|
|
Don't understand that. Please offer references and Detail.
Note, I'm very bad at coding. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Nov 26, 2009 3:36 am Post subject: |
|
|
u can group them by using ahk_group
check help file for more details (related to GroupAdd) |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Thu Nov 26, 2009 2:34 pm Post subject: |
|
|
Or you could try:
| Code: | Settitlematchmode, Regex
#IfWinactive ahk_class (class1|class2|class3)
!1::
do stuff
return
|
|
|
| Back to top |
|
 |
magarocule
Joined: 20 Oct 2009 Posts: 8
|
Posted: Thu Nov 26, 2009 8:20 pm Post subject: |
|
|
| Anonymous wrote: | u can group them by using ahk_group
check help file for more details (related to GroupAdd) |
I did but the hotkey stopped working because of that.
| Code: | #IfWinActive, ahk_group xyz
!1::
{
do stuff
return
}
|
Should this work for all windows in xyz? |
|
| Back to top |
|
 |
magarocule
Joined: 20 Oct 2009 Posts: 8
|
Posted: Thu Nov 26, 2009 8:43 pm Post subject: |
|
|
| aaffe wrote: | Or you could try:
| Code: | Settitlematchmode, Regex
#IfWinactive ahk_class (class1|class2|class3)
!1::
do stuff
return
|
|
That's it man! Thanks!
Some intuition would use me well, a (|) is not so hard to think of.
Too bad intuition works rationally and mine is baffled. You can be in front of the wave, or behind it, but the ship is sinking and the boat is busted. God I hate things. |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Fri Nov 27, 2009 8:25 am Post subject: |
|
|
Youre welcome!  |
|
| Back to top |
|
 |
|