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 a double hotkey ?

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



Joined: 17 Sep 2006
Posts: 14

PostPosted: Thu Nov 09, 2006 8:06 pm    Post subject: how to make a double hotkey ? Reply with quote

hello everybody !

I have a problem.

I want use one touch of my keyboard to make a double hotkey :


If I push on CONTROL+q,
Send F11
Wait for 1 seconde
Close the present application
Close de autohotkey script

I tried this :

Code:
~^q::
Sendinput, {F11}
ExitApp
Return


But It does not work...

Please help me !

thank tou
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Thu Nov 09, 2006 8:12 pm    Post subject: Reply with quote

Well, you don't have anything in your hotkey that would close the current application. All I see is something to send F11 (that part works fine, right?), and ExitApp to close the AutoHotkey script.

To close the active window, try using WinClose, A, like this:

Code:
~^q::
Sendinput, {F11}
WinClose,A
ExitApp


Also, if F11 is supposed to go to the same window you're closing, you may want to wait for it to do whatever it's doing before you kill it. For instance, you could put a Sleep,3000 (Wait for 3 seconds) in between the SendInput and the WinClose.
Back to top
View user's profile Send private message
vstmusic



Joined: 17 Sep 2006
Posts: 14

PostPosted: Thu Nov 09, 2006 9:09 pm    Post subject: Reply with quote

Thank you but it does not work !

In fact, Ctrl Q is a intern hotkey in Ableton Live. I don't need Winclose,A .

I don't understand Shocked
Back to top
View user's profile Send private message
quicktest



Joined: 30 Jul 2004
Posts: 42

PostPosted: Thu Nov 09, 2006 9:37 pm    Post subject: Reply with quote

Hope I can help clarify things a bit...

- By default, once AutoHotKey intercepts Ctrl Q, it will not be sent to Ableton Live. In other words, Ableton Live will not know that you pressed Ctrl Q.
- ExitApp quits your AutoHotKey script, not Ableton Live.
- WinClose,A is the command to close Ableton Live.
- Your script will keep running if you use Return instead of ExitApp at the end.
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Thu Nov 09, 2006 10:09 pm    Post subject: Reply with quote

Actually, quicktest, he has the tilde (~) prefix on it, so it will go through to Ableton. Also, I believe he wanted to exit the script as well.

vstmusic, could you explain what exactly doesn't work about it? What is the F11 key supposed to do, and what actually happens?
Back to top
View user's profile Send private message
quicktest



Joined: 30 Jul 2004
Posts: 42

PostPosted: Thu Nov 09, 2006 10:37 pm    Post subject: Reply with quote

Guess I only muddled things further... sorry vst & jonny. Embarassed

By coincidence, I just was looking for the command to pass the hotkey to application. Learning something new at every post. Smile
Back to top
View user's profile Send private message
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