AutoHotkey Community

It is currently May 27th, 2012, 2:51 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: November 26th, 2009, 3:15 am 
Offline

Joined: October 20th, 2009, 9:40 pm
Posts: 8
IfWinActive with multiple windows as parameter?
eg.
Code:
#IfWinActive, ahk_class Type1 Type2 Type3
!1::
do stuff
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2009, 3:33 am 
Offline

Joined: July 18th, 2006, 12:18 pm
Posts: 403
Use a loop?...

Code:
types = type1:type2:type3
Loop, Parse, types, :
; code


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2009, 4:11 am 
Offline

Joined: October 20th, 2009, 9:40 pm
Posts: 8
Don't understand that. Please offer references and Detail.
Note, I'm very bad at coding.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2009, 4:36 am 
u can group them by using ahk_group
check help file for more details (related to GroupAdd)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2009, 3:34 pm 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Or you could try:
Code:
Settitlematchmode, Regex
#IfWinactive ahk_class (class1|class2|class3)
!1::
do stuff
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2009, 9:20 pm 
Offline

Joined: October 20th, 2009, 9:40 pm
Posts: 8
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2009, 9:43 pm 
Offline

Joined: October 20th, 2009, 9:40 pm
Posts: 8
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2009, 9:25 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Youre welcome! :wink:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn, XstatyK and 24 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group