Autohotkey users - a hotkey to open plug-in's GUI

Discuss music production with Ableton Live.
Post Reply
baseinstinct
Posts: 929
Joined: Sun Feb 24, 2008 3:45 am

Autohotkey users - a hotkey to open plug-in's GUI

Post by baseinstinct » Tue May 06, 2008 1:20 am

Is there a way to use a hotkey to open plug-in's GUI?


Unfortunately this tiny button is not in always fixed position.

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Tue May 06, 2008 1:44 am

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...

baseinstinct
Posts: 929
Joined: Sun Feb 24, 2008 3:45 am

Post by baseinstinct » Tue May 06, 2008 2:49 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

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Tue May 06, 2008 4:20 pm

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:

Image

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.

stutter
Posts: 488
Joined: Tue Sep 05, 2006 3:58 pm

Post by stutter » Tue May 06, 2008 7:27 pm

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.

baseinstinct
Posts: 929
Joined: Sun Feb 24, 2008 3:45 am

Post by baseinstinct » Tue May 06, 2008 9:40 pm

Thanks guys, but I don't like these requirements. There is a certain level of usability of AHK; beyond that it's too much messing around. I am going to add the feature to the wishlist. Maybe Live 8.

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Tue May 06, 2008 11:18 pm

Well I am currently busy programming, already got it to work, searching for that one particular pixel goes really well! :D

I'll post it here when it's done, it will be really easy to modify for different resolutions.

Cheers. :D

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Wed May 07, 2008 2:12 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:

`:: ; 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
}
ATTENTION:

-->> 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. :D

misteron
Posts: 506
Joined: Fri Mar 21, 2008 2:28 am

Post by misteron » Wed May 07, 2008 2:06 pm

Liva has a built-in shortcut (Ctrl+Alt+P) to open/close the plugin GUI which works for me.
But do you all have the same problem that it only works until the GUI is closed with the mouse via either it's "x" button or the wrench icon?

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Wed May 07, 2008 3:12 pm

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.

Alien Leg
Posts: 169
Joined: Sat Jun 04, 2005 12:37 pm
Location: Austria

Post by Alien Leg » Wed May 07, 2008 5:40 pm

Nice, I'm also using the plugin windows that way and its a pain in the ass that Live closes all windows when reopening a set!
Win XP Pro SP3, Live 7
Q9450@3.2Ghz, 4 GB RAM,
BCF2000, M-Audio Audiophile 2496, Mindprint TRIO

baseinstinct
Posts: 929
Joined: Sun Feb 24, 2008 3:45 am

Post by baseinstinct » Wed May 07, 2008 8:56 pm

Next to the wrench there should be an eye toggle button.

If eye is lit RShift+Enter (okay, can stay ctrlaltP ; ) opens the plug. Should not be reset on closing the project.

Come on Able.

djsynchro
Posts: 7471
Joined: Thu Jun 23, 2005 9:06 pm
Location: Amsterdam, Netherlands
Contact:

Post by djsynchro » Wed May 07, 2008 11:40 pm

First version of the AutoHotkeys script
http://www.ableton.com/forum/viewtopic.php?t=91075

Post Reply