| View previous topic :: View next topic |
| Author |
Message |
vstmusic
Joined: 17 Sep 2006 Posts: 14
|
Posted: Thu Nov 09, 2006 8:06 pm Post subject: how to make a double hotkey ? |
|
|
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 |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Nov 09, 2006 8:12 pm Post subject: |
|
|
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 |
|
 |
vstmusic
Joined: 17 Sep 2006 Posts: 14
|
Posted: Thu Nov 09, 2006 9:09 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
quicktest
Joined: 30 Jul 2004 Posts: 42
|
Posted: Thu Nov 09, 2006 9:37 pm Post subject: |
|
|
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 |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Nov 09, 2006 10:09 pm Post subject: |
|
|
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 |
|
 |
quicktest
Joined: 30 Jul 2004 Posts: 42
|
Posted: Thu Nov 09, 2006 10:37 pm Post subject: |
|
|
Guess I only muddled things further... sorry vst & jonny.
By coincidence, I just was looking for the command to pass the hotkey to application. Learning something new at every post.  |
|
| Back to top |
|
 |
|