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 

How to make two hotkeys for the same action?

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






PostPosted: Tue Nov 17, 2009 6:25 pm    Post subject: How to make two hotkeys for the same action? Reply with quote

~Tab & NumPad8::
{
IfWinExist, CatiAtHome
WinActivate
Send 11+{enter 2}
}
return



!-::
{
IfWinExist, CatiAtHome
WinActivate
Send 11+{enter 2}
}
return


Is there a more elegant way to combine two shortcuts for the same thing?
Back to top
Leef_me



Joined: 08 Apr 2009
Posts: 1158
Location: San Diego, California

PostPosted: Tue Nov 17, 2009 6:28 pm    Post subject: Reply with quote

This seems more elegant to me. What do you think ?
Code:
~Tab & NumPad8::
!-::
{
IfWinExist, CatiAtHome
WinActivate
Send 11+{enter 2}
}
return
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Nov 17, 2009 6:28 pm    Post subject: Reply with quote

u have few options:
1.
Code:

a::
b::
msgbox
return
 

2.
Code:

a:
gosub, function
;do something
return
b::
gosub, function
;do something different
return
function:
msgbox
return
Back to top
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