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 

Can one script execute a hotkey in another script?

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



Joined: 26 Mar 2009
Posts: 15

PostPosted: Fri Jan 01, 2010 11:13 pm    Post subject: Can one script execute a hotkey in another script? Reply with quote

I'm trying to have script #2 execute a hotkey found in script #1.

I tried having #2 "SendInput" the hotkey (!>b) but it didn't work.

Can someone tell me how to do this? Thanks1
Back to top
View user's profile Send private message
Leef_me



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

PostPosted: Sat Jan 02, 2010 8:20 am    Post subject: Reply with quote

The following two scripts give an example of something that works.

Code:
; script #1
#h::

msgbox,,, Ok... Who pressed Win-x ? ,2

Code:
; script #2
sleep, 3000

sendinput #h


I tried to place the hotkey you wrote of "(!>b)" in a script, but also could not get it to work. I did find that manually entering !b instead of !>b would trigger the script with your listed hotkey.

I don't see how the > is being left out, but perhaps you could simplify your hotkey requirement? It seems that actually entering that hotkey would be virtually impossible.

If you have to have that combination, I suggest looking at this link for more information. http://www.autohotkey.com/docs/Hotkeys.htm#Features
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