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 

Keyboard Shortcut for Different Windows

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



Joined: 01 Sep 2006
Posts: 42

PostPosted: Thu Nov 20, 2008 3:05 pm    Post subject: Keyboard Shortcut for Different Windows Reply with quote

Is it possible to have AHK detect when I have a certain App open and
change the shortcut for my keyboard ?

FREX: I use ALT-F11 to open Paint Shop Pro on my PC. However when I use MS Excel, I want to use ALT-F11 to open the VBA editor.

My AHK stays in the tray all day, I'm just wondering if it can check to see that Excel is open and disable the ALT-F11 and use the Excel keyboard shortcut or not.

Otherwise, I'll just make a new key-combo Razz


>
_________________
Thanks, Gadrin
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Thu Nov 20, 2008 3:26 pm    Post subject: Reply with quote

Yes, check #IfWinActive
http://www.autohotkey.com/docs/commands/_IfWinActive.htm
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Carlol



Joined: 14 Aug 2006
Posts: 163
Location: CPH

PostPosted: Thu Nov 20, 2008 6:06 pm    Post subject: Reply with quote

Perhaps something like this:

Code:
#IfWinActive, ahk_class XLMAIN
!F11::
Send, !{F11}
Return
#IfWinActive


Good luck Smile
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