The Definitive Live Autohotkeys script!
http://www.ableton.com/forum/viewtopic.php?t=91075
Script to open all plugin Windows, mainly for those with dual monitors, one screen with live, one with plugs, set to "autohide" when you select a track the tracks plugs show on the 2nd screen, nice!
BUTTTTT!!!!! Live close all the VST windows when you first open a saved set. Now you've got to go and manually open 100 windows with the mouse!
So now the script does that for you.
.AHK files with lots of comments in the code, feel free to change/adapt/print out on paper feed to your dog... whatever.
Script to open all plugin Windows, mainly for those with dual monitors, one screen with live, one with plugs, set to "autohide" when you select a track the tracks plugs show on the 2nd screen, nice!
BUTTTTT!!!!! Live close all the VST windows when you first open a saved set. Now you've got to go and manually open 100 windows with the mouse!
So now the script does that for you.
.AHK files with lots of comments in the code, feel free to change/adapt/print out on paper feed to your dog... whatever.
Re:
rozling wrote:Pulling this off with one key is definitely the next logical step, though I haven't quite got my head around alternating between different sets of actions with a single keystroke.
To answer directly: yes you can - multiple keystrokes are quite easy to do in AHK, e.g. in one part of the script I've done the following for View I/O as my laptop has issues understanding the standard Ctrl+Alt+i:The problem is I'm not sure how to make it so that the first press does the above but the second press does something likeCode: Select all
i:: { Send {RCtrl Down}{RAlt Down}{i}{Ralt Up} Sleep 50 Send {RAlt Down}{i}{Ralt Up}{RCtrl Up} } return
which would maximise the mixer view for detailed metering (once it knows where the top of the Mixer Bar and the top of Live's window are).Code: Select all
i:: { MouseClickDrag, left, MixerBarX, MixerBarY, TopOfLiveWindowX, TopOfLiveWindowY } return
Actually I hadn't considered what you say in the last line of your post - let me think about that one. Incidentally posting the above code has solved a problem I was having in the script - thanks!
Hey - I have made some successful progress with stacked commands on 1 key.
I still can't find your script, please, post it in code brackets!
Re: The Definitive Live Autohotkeys script!
This semi pseudo code runs a diff path based on which way the variable "window" is set so it toggles back and forth and running two alternating code blocks from hitting the f9 key.
Code: Select all
f9::
if window = closed
{
do some things
open the window ;open window
window = open ;update window status variable
return
}
else
{
do some things
close the window ;close window
window = closed ;update window status variable
}
return
Re: The Definitive Live Autohotkeys script!
Ok - I think I get that - here is some code from a thread on ahk forum, that I used to get 3 functionsdrb wrote:This semi pseudo code runs a diff path based on which way the variable "window" is set so it toggles back and forth and running two alternating code blocks from hitting the f9 key.
Code: Select all
f9:: if window = closed { do some things open the window ;open window window = open ;update window status variable return } else { do some things close the window ;close window window = closed ;update window status variable } return
on one key.
Try this one, just press the F1 key once, then twice, then three times.
Autohotkey script.
Code: Select all
F1::CountPresses("Once","Twice","Three") ;
Once: ; Send hotkey for original function
MsgBox, 0, , You pressed 1 time, .75
Return
Twice:
MsgBox, 0, , You pressed 2 times, .75
Return
Three:
MsgBox, 0, , You pressed 3 times, .75
Return
CountPresses(param1, param2, param3) {
Global
pressed1 := param1, pressed2 := param2, pressed3 := param3
PressCount += 1
SetTimer WaitKeyPress, 400 ; Restart waiting for more presses
}
WaitKeyPress:
SetTimer WaitKeyPress, off ; run timer only once
GoSub % PressCount < 3 ? pressed%PressCount% : pressed3
PressCount := 0
Return
Re: The Definitive Live Autohotkeys script!
The second example is so you can have a function that does one thing if you press a key once, and then another if you press it twice.
The code I showed above is a toggle, so first the key does once thing, and next time it does something else. Like muting a track, and then unmuting next time you hit the same key.
The code I showed above is a toggle, so first the key does once thing, and next time it does something else. Like muting a track, and then unmuting next time you hit the same key.
Re: The Definitive Live Autohotkeys script!
Got it, that is very useful, I can see that for a number of things.drb wrote:The second example is so you can have a function that does one thing if you press a key once, and then another if you press it twice.
The code I showed above is a toggle, so first the key does once thing, and next time it does something else. Like muting a track, and then unmuting next time you hit the same key.