AutoHotkey Community

It is currently May 27th, 2012, 12:24 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: December 6th, 2009, 2:52 am 
Offline

Joined: August 30th, 2009, 5:14 pm
Posts: 10
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2009, 3:16 am 
Offline

Joined: May 10th, 2009, 7:30 pm
Posts: 45
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2009, 4:45 am 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
Make a group for the window classes with GroupAdd.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Google Feedfetcher, iDrug, Leef_me, rjgatito and 22 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