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, ahk_class X or ahk_class Y <---not working

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



Joined: 28 Mar 2007
Posts: 28

PostPosted: Tue Jun 26, 2007 5:16 am    Post subject: #ifWinActive, ahk_class X or ahk_class Y <---not working Reply with quote

I cannot find the syntax for this. Can someone please help me?

Sorry for being me.

~fogus
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue Jun 26, 2007 5:19 am    Post subject: Reply with quote

GroupAdd
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Helpy
Guest





PostPosted: Tue Jun 26, 2007 10:04 am    Post subject: Reply with quote

Yes, use groups, or SetTitleMatchMode RegEx and
#ifWinActive ahk_class X|Y
Back to top
fogus



Joined: 28 Mar 2007
Posts: 28

PostPosted: Tue Jun 26, 2007 5:46 pm    Post subject: Reply with quote

So, would I do:

Code:

SetTitleMatchMode 2

;GROUPS
GroupAdd, explorer, AHK_CLASS ExploreWClass
GroupAdd, explorer, AHK_CLASS CabinetWClass

#ifWinActive, explorer


or would it be #ifGroupActive?
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue Jun 26, 2007 6:08 pm    Post subject: Reply with quote

that looks right - did you try it?
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
fogus



Joined: 28 Mar 2007
Posts: 28

PostPosted: Tue Jun 26, 2007 6:26 pm    Post subject: Reply with quote

Just did. Nothing happens. I think its waiting for a window called "explorer", rather than any of the windows in my group. What is the syntax for a group?
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue Jun 26, 2007 6:29 pm    Post subject: Reply with quote

ah... ahk_group explorer
I should have caught that.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
fogus



Joined: 28 Mar 2007
Posts: 28

PostPosted: Tue Jun 26, 2007 6:41 pm    Post subject: Reply with quote

Works. Thanks tons.

Still learning over here...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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