| View previous topic :: View next topic |
| Author |
Message |
barty
Joined: 30 Aug 2009 Posts: 10
|
Posted: Sun Dec 06, 2009 1:52 am Post subject: apply #ifwinactive to more than one window class |
|
|
I have a #ifwinactive section that I want to apply to two window classes
MediaPlayerClassicW
MPC D3D Fullscreen
The section is rather long and I don't want to duplicated it since if I need to change something I have to change both.
This doesn't work
| Code: |
#IfWinActive, ahk_class MediaPlayerClassicW
#IfWinActive, ahk_class MPC D3D Fullscreen
.......
#IfWinActive
#IfWinActive
|
since of course it just doesn't catch the inner condition.
is this possible? thanks |
|
| Back to top |
|
 |
JohnnyTwoTone
Joined: 10 May 2009 Posts: 45
|
Posted: Sun Dec 06, 2009 2:16 am Post subject: |
|
|
not sure if you can do it with #ifwinactive but something like this should work
http://www.autohotkey.com/docs/commands/Hotkey.htm
| Code: | hotkey, ifwinactive, ahk_class Notepad
hotkey, #s, sendtext
hotkey, ifwinactive, ahk_class WordPadClass
hotkey, #s, sendtext
Return
sendtext:
send wtf
Return |
|
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Sun Dec 06, 2009 3:45 am Post subject: |
|
|
| Make a group for the window classes with GroupAdd. |
|
| Back to top |
|
 |
|