AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IfWinActive with multiple windows as parameter

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
magarocule



Joined: 20 Oct 2009
Posts: 8

PostPosted: Thu Nov 26, 2009 2:15 am    Post subject: IfWinActive with multiple windows as parameter Reply with quote

IfWinActive with multiple windows as parameter?
eg.
Code:
#IfWinActive, ahk_class Type1 Type2 Type3
!1::
do stuff
return
Back to top
View user's profile Send private message
i3egohan



Joined: 18 Jul 2006
Posts: 403

PostPosted: Thu Nov 26, 2009 2:33 am    Post subject: Reply with quote

Use a loop?...

Code:
types = type1:type2:type3
Loop, Parse, types, :
; code
Back to top
View user's profile Send private message
magarocule



Joined: 20 Oct 2009
Posts: 8

PostPosted: Thu Nov 26, 2009 3:11 am    Post subject: Reply with quote

Don't understand that. Please offer references and Detail.
Note, I'm very bad at coding.
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Nov 26, 2009 3:36 am    Post subject: Reply with quote

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

PostPosted: Thu Nov 26, 2009 2:34 pm    Post subject: Reply with quote

Or you could try:
Code:
Settitlematchmode, Regex
#IfWinactive ahk_class (class1|class2|class3)
!1::
do stuff
return
Back to top
View user's profile Send private message
magarocule



Joined: 20 Oct 2009
Posts: 8

PostPosted: Thu Nov 26, 2009 8:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
magarocule



Joined: 20 Oct 2009
Posts: 8

PostPosted: Thu Nov 26, 2009 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
aaffe



Joined: 17 May 2007
Posts: 1002
Location: Germany - Deutschland

PostPosted: Fri Nov 27, 2009 8:25 am    Post subject: Reply with quote

Youre welcome! Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group