Autohotkey users - a hotkey to open plug-in's GUI
-
- Posts: 929
- Joined: Sun Feb 24, 2008 3:45 am
Autohotkey users - a hotkey to open plug-in's GUI
Is there a way to use a hotkey to open plug-in's GUI?
Unfortunately this tiny button is not in always fixed position.
Unfortunately this tiny button is not in always fixed position.
You could maybe scan the row where the buttons are (and where the button to open the plug-in window is) and then test for the pixel-pattern (of the "wrench" icon) then the script would know where to send the mouse and click.
Hmm. I'm going to have a look, because I'm annoyed that Live closes all VST windows when you load a song. I have 2 monitors and I want them to open (because they are on the 2nd monitor anyway)
Stay tuned...
Hmm. I'm going to have a look, because I'm annoyed that Live closes all VST windows when you load a song. I have 2 monitors and I want them to open (because they are on the 2nd monitor anyway)
Stay tuned...
-
- Posts: 929
- Joined: Sun Feb 24, 2008 3:45 am
Test for the pixel pattern ?!?
Sounds incredible. I didn't know AHK was capable of such tricks.
What is it technically called in AHK manual?
A shift+Enter would be my choice to open the gui of the selected track. This current aiming is pointless.
So far I have made RAlt open/close the explorer and RWin rhe bottom roll/rack window. Greatly improves performance.
Apps does not respond properly in Live, though.
Cheers
T
Sounds incredible. I didn't know AHK was capable of such tricks.
What is it technically called in AHK manual?
A shift+Enter would be my choice to open the gui of the selected track. This current aiming is pointless.
So far I have made RAlt open/close the explorer and RWin rhe bottom roll/rack window. Greatly improves performance.
Apps does not respond properly in Live, though.
Cheers
T
I haven't used AHK for a while but I remember being able to test the value of a pixel (this is why scripts often only work on a particular skin.)
So what I meant was, write a piece of code that looks at a couple of pixels to find where the "wrench" icon is.
As luck would have it, there's only 1 pixel to test though, even easier.
Have a look:
This is from my setup. Monitor resolution is 1680 x 1050. Skin is "default 5.2"
I use Live in "full screen" mode. This is also necessary, because that way the icons will be at the same Y-position always.
Now all you need to do is, in a loop, scan from left to right, (Y coordinate for my screen is 829 pixels down), until you find a pixel with the values:R=110 G=111 B=115. For clarity I've coloured it pink.
Bingo! The only graphic element on this line that contains a pixel with those values is the "wrench" icon. Now let AHK move the mouse there and do a mouseclick, continue scanning.
The drawbacks for this kludge:
- Live needs to be in full screen mode.
- You need to always use the same skin
- Devices need to be visible.
- If you have a lot of devices the script won't be open to open the VST windows that are off screen. That could also be programmed, personally I don't have this situation very often, although the script could be expanded to include this.
So what I meant was, write a piece of code that looks at a couple of pixels to find where the "wrench" icon is.
As luck would have it, there's only 1 pixel to test though, even easier.
Have a look:
This is from my setup. Monitor resolution is 1680 x 1050. Skin is "default 5.2"
I use Live in "full screen" mode. This is also necessary, because that way the icons will be at the same Y-position always.
Now all you need to do is, in a loop, scan from left to right, (Y coordinate for my screen is 829 pixels down), until you find a pixel with the values:R=110 G=111 B=115. For clarity I've coloured it pink.
Bingo! The only graphic element on this line that contains a pixel with those values is the "wrench" icon. Now let AHK move the mouse there and do a mouseclick, continue scanning.
The drawbacks for this kludge:
- Live needs to be in full screen mode.
- You need to always use the same skin
- Devices need to be visible.
- If you have a lot of devices the script won't be open to open the VST windows that are off screen. That could also be programmed, personally I don't have this situation very often, although the script could be expanded to include this.
you might want to use the imagesearch command, it can be a bit more reliable, although it doesn't solve any of the problems djsynchro points out other than the full screen issue. You would have to take a screen shot and create an image of the wrench icon. You could potentially write something to toggle the editor/plugin tab to switch when searching for the icon, so that you don't necessarily have to have the plugin side visible first of all.
-
- Posts: 929
- Joined: Sun Feb 24, 2008 3:45 am
OK that's working. It's really lucky that this pixel is unique to the VST icon, because AHK lets you specify an area and it will then search for a pixel with that value. Easy! If you want to try it here's the script:
-->> It needs the "default 5.2" skin that came with Live 6 this also works in 7 (You need to get it from Live 6 because it has a colour for macro mapping in it and the real Live 5 skin probably won't have this)
-->> You need to put your monitor resolution in the script.
It worked on both my 1280x800 laptop and my 1680x1050 DAW
-->> You need to press F11 so Live is in full screen mode so the script knows where to expect the VST open buttons.
-->> If a VST window open and then covers a button the script won't "see" that button and won't be able to click it. This is best for when you have 2 monitors which brings me to...
I you have 2 monitor and you use one for Live and the other one for your plug-ins. You have probably noticed that when you drag your plugs to the 2nd screen the positions are saved but when you first load up a saved set, all plug-in windows are closed. I am going to extend the script so you can run it after you open a set, it will select tracks one by one and open all the plugins.
probaly tomorrow - stay tuned.
ATTENTION:
`:: ; Hotkey = "`"
; Stikka is the New Graffiti!
Width=1280 ; Width of monitor
Height=800 ; Height of monitor
Testpixel=0x6e6f73 ; Value of pixel to identify VST "Wrench" Icon
X=25 ; x-coordinate of area left to test
Y:=(Height-180) ; y-top coordinate of test area
YY:=(Height-5) ; Y-bottom coordinate of test area
Loop
{
PixelSearch Px, Py, X, Y, Width, YY, Testpixel, 0, Fast, RGB
If Errorlevel ; If no (or no more) grey wrench icons exist.
Break
MouseMove, Px, Py, 0
MouseClick, left, Px, Py, , 0
MouseMove, 0, -13 , 0, R
MouseClick, left ; Click to make Live the active window again
}
-->> It needs the "default 5.2" skin that came with Live 6 this also works in 7 (You need to get it from Live 6 because it has a colour for macro mapping in it and the real Live 5 skin probably won't have this)
-->> You need to put your monitor resolution in the script.
It worked on both my 1280x800 laptop and my 1680x1050 DAW
-->> You need to press F11 so Live is in full screen mode so the script knows where to expect the VST open buttons.
-->> If a VST window open and then covers a button the script won't "see" that button and won't be able to click it. This is best for when you have 2 monitors which brings me to...
I you have 2 monitor and you use one for Live and the other one for your plug-ins. You have probably noticed that when you drag your plugs to the 2nd screen the positions are saved but when you first load up a saved set, all plug-in windows are closed. I am going to extend the script so you can run it after you open a set, it will select tracks one by one and open all the plugins.
probaly tomorrow - stay tuned.
Hi,
I'm currently debugging an AutoHotkeys script I wrote.
One command will open all VST plug-in windows in a selected track
The second command opens all VST windows on all vsible tracks.
This is so when you have 2 monitors you can use "auto hide" and then each time you select a track the VSTs will open on your 2nd screen. But Live closes all VST windows when you load a set, so first you need to open everything, track by track. this script will do that.
I'm currently debugging an AutoHotkeys script I wrote.
One command will open all VST plug-in windows in a selected track
The second command opens all VST windows on all vsible tracks.
This is so when you have 2 monitors you can use "auto hide" and then each time you select a track the VSTs will open on your 2nd screen. But Live closes all VST windows when you load a set, so first you need to open everything, track by track. this script will do that.
-
- Posts: 929
- Joined: Sun Feb 24, 2008 3:45 am
First version of the AutoHotkeys script
http://www.ableton.com/forum/viewtopic.php?t=91075
http://www.ableton.com/forum/viewtopic.php?t=91075