The Definitive Live Autohotkeys script!
What's this line all about?
Searches the screen for a bitmap? Do we need that bitmap?
Does any of this break L6?
-Ben
Code: Select all
ImageSearch, ClipBraceStartX, ClipBraceStartY, 87, 594, 1017, 615, *55 C:\Documents and Settings\Eoin\My Documents\Music Files\Eoin Library\Autohotkeys stuff\Clipbrace start - unselected.jpg
Does any of this break L6?
-Ben
Apologies, I was away for a few months and was somehow unsubscribed to this thread & didn't see the replies... anyhoo it seems I prematurely posted my efforts to automate the clip brace. I had worked on it for a while and gave up. MrYellow, it does reference bitmaps, which are screenshots of the clip brace itself.
I'm convinced that the best way to automate complex stuff like this in a performance situation is to get the script to look at the screen just as we would before making a judgement on where to click. This was my first attempt at referencing images - if I/we can figure out how to do it effectively there's a lot of cool stuff we can automate in Live.
Here is a .rar with the images. Note, however, that I work with the Metal skin (which is still available in Live 6) so you'll need to switch to that for testing, or else take your screenshots. It's pretty easy to make those .jpgs - I did it in a couple of minutes using Irfanview.
I haven't really used the script with Live 6 yet but I can't imagine a few random clicks would break it. If things start getting wierd press the 'pause' button on your keyboard, or failing that just kill the Autohotkeys process.
Hmm, just realised the loop brace looks different in 6. That could cause probs but don't have time to check it out now as I'm heading off for the weekend.
Hope this helps/encourages!
Roz
I'm convinced that the best way to automate complex stuff like this in a performance situation is to get the script to look at the screen just as we would before making a judgement on where to click. This was my first attempt at referencing images - if I/we can figure out how to do it effectively there's a lot of cool stuff we can automate in Live.
Here is a .rar with the images. Note, however, that I work with the Metal skin (which is still available in Live 6) so you'll need to switch to that for testing, or else take your screenshots. It's pretty easy to make those .jpgs - I did it in a couple of minutes using Irfanview.
I haven't really used the script with Live 6 yet but I can't imagine a few random clicks would break it. If things start getting wierd press the 'pause' button on your keyboard, or failing that just kill the Autohotkeys process.
Hmm, just realised the loop brace looks different in 6. That could cause probs but don't have time to check it out now as I'm heading off for the weekend.
Hope this helps/encourages!
Roz
Shouldn't make a difference, no. Autohotkeys lets you scan only a specific area of the screen, defined in pixels.
These little subroutines are inactive until you press the key combination which invokes them - then it does its screen-scanning thing. If it causes any trouble for you simply don't use the key command or remove it from the script if you like.
Roz
These little subroutines are inactive until you press the key combination which invokes them - then it does its screen-scanning thing. If it causes any trouble for you simply don't use the key command or remove it from the script if you like.
Roz
Rozling, can we highlight devices for instant mapping with autohotkeys?
cheers
cheers
http://soundcloud.com/coelho
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
-
- Posts: 1807
- Joined: Tue Nov 16, 2004 6:27 pm
- Location: Here and There
- Contact:
Yes you can, dont know if this script does it but i have made a very simple script that selects devices ( for me sometimes the alt+ down doesnt work properly ) and a few other things like select sample display editor It basically tells the pointer to move to a certain point on the screen and click there. Ill send it your way but youll probably have to edit it a bit because its based on screen size- but its very simple to understand. shouldnt take you more than 15 minutes to get it working with your setup.SubQ wrote:Rozling, can we highlight devices for instant mapping with autohotkeys?
cheers
-
- Posts: 2164
- Joined: Thu Jul 21, 2005 10:09 pm
Brilliant, Mike. So if i'm getting this right, you're using one key to get the mouse pointer were you want - say a device. Right?Yes you can, dont know if this script does it but i have made a very simple script that selects devices ( for me sometimes the alt+ down doesnt work properly ) and a few other things like select sample display editor It basically tells the pointer to move to a certain point on the screen and click there. Ill send it your way but youll probably have to edit it a bit because its based on screen size- but its very simple to understand. shouldnt take you more than 15 minutes to get it working with your setup
Now here´s the thing: I want to use midi controller buttons or rotaries to do this - my foxes are sitting on the notebooks qwerty, and I don't want to expand my setup. I imagine this is possible trough Bome's, assigning a income midi message to a sequence of keys, or to a autohotkey script. Am I at the right direction here?
thanks to all again.
http://soundcloud.com/coelho
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
I've done it slightly differently, using a string of key-presses - I'll post what I have in the next post. Only problem is when you have clip brace selected - should be easy to overcome, just haven't had time to sort it out yet. This method should avoid your mouse click hitting something you don't want it to, although I imagine with the mouseclik you could easily find a way of avoiding that.
Anyway, just copy the next post into an autohotkeys script and have a go - important to notice that the numpad keys I've used are available only when Numlock is off - did this so that I could still use it for typing in numbers
SubQ - you could easily use Bome's to translate a midi note from a button into a keystroke
...
Anyway, just copy the next post into an autohotkeys script and have a go - important to notice that the numpad keys I've used are available only when Numlock is off - did this so that I could still use it for typing in numbers
SubQ - you could easily use Bome's to translate a midi note from a button into a keystroke
...
;SETTING FOCUS
NumpadIns::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Down
}!{Down}!{Down}!{Down}!{Down}!{Down}
}
return
; Focus on clip details - NEEDS Making compatible with CLIP BRACE
NumpadDel::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Up}!{Left}
}
return
; Focus on browser
NumpadEnd::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Right}!{Up 3}!{Down}
}
return
; Focus on clip slot
NumpadDown::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Right}!{Up 3}
}
return
; Focus on track title
NumpadPgDn::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Right}!{Up 3}!{Down 2}
}
return
; Focus on Overview, not sure for what use
NumpadIns::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Down
}!{Down}!{Down}!{Down}!{Down}!{Down}
}
return
; Focus on clip details - NEEDS Making compatible with CLIP BRACE
NumpadDel::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Up}!{Left}
}
return
; Focus on browser
NumpadEnd::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Right}!{Up 3}!{Down}
}
return
; Focus on clip slot
NumpadDown::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Right}!{Up 3}
}
return
; Focus on track title
NumpadPgDn::
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
{
Send, !{Right}!{Up 3}!{Down 2}
}
return
; Focus on Overview, not sure for what use
thnks stutter. I'll try you script later.
http://soundcloud.com/coelho
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
Here's a script I wrote tonight.. A bit messy, but handy.
;--------------------------------------------------------------------------
;EXPAND EDIT WINDOW WITH A KEY TO TOGGLE LARGE/SMALL
;script by db@skylab2000.com - please email fixes & improvements v.1
;
;window must initially be in default small edit size to use this toggle key
;don't resize manually - only use this toggle key so the script knows where the windows was resized to.
;
;
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
;
;define vars
f9:: ; choose key to redefine (this is f9, which was record key)
wheight = 125 ; top row # of window size desired - approx 125 -700 are 'legal'
;
;
if window = closed ; test window state
{
;open window
MouseGetPos, xpos, ypos ; get mouse position
MouseClickDrag, L, 200, 759, 200, wheight ; open window to size defined in wheight above
MouseMove, xpos, ypos, 0 ; return mouse to where it was
MsgBox, 0,, window was just expanded, .5 ; display window state for testing
window = open ; update window status variable
return
}
else
{
;close window
MouseGetPos, xpos, ypos ; get mouse position
MouseClickDrag, L, 200, wheight, 200, 759 ; close window to normal
MouseMove, xpos, ypos, 0 ; return mouse to where it was
msgbox, 0,, window was just contracted, .5 ; display window state for testing
window = closed ; update window status variable
}
return
;--------------------------------------------------------------------------
EDIT: My script moves cursor to the spot where it then drags the window up. I'd assume that in diff screen resolutions it may not work. I'm at 1280*1024. You'd need to change coordinate to proper screen locations if it doesn't function on your machine.
;--------------------------------------------------------------------------
;EXPAND EDIT WINDOW WITH A KEY TO TOGGLE LARGE/SMALL
;script by db@skylab2000.com - please email fixes & improvements v.1
;
;window must initially be in default small edit size to use this toggle key
;don't resize manually - only use this toggle key so the script knows where the windows was resized to.
;
;
#IfWinActive, ahk_class Afx:00400000:0:00000000:01900015:00000000
;
;define vars
f9:: ; choose key to redefine (this is f9, which was record key)
wheight = 125 ; top row # of window size desired - approx 125 -700 are 'legal'
;
;
if window = closed ; test window state
{
;open window
MouseGetPos, xpos, ypos ; get mouse position
MouseClickDrag, L, 200, 759, 200, wheight ; open window to size defined in wheight above
MouseMove, xpos, ypos, 0 ; return mouse to where it was
MsgBox, 0,, window was just expanded, .5 ; display window state for testing
window = open ; update window status variable
return
}
else
{
;close window
MouseGetPos, xpos, ypos ; get mouse position
MouseClickDrag, L, 200, wheight, 200, 759 ; close window to normal
MouseMove, xpos, ypos, 0 ; return mouse to where it was
msgbox, 0,, window was just contracted, .5 ; display window state for testing
window = closed ; update window status variable
}
return
;--------------------------------------------------------------------------
EDIT: My script moves cursor to the spot where it then drags the window up. I'd assume that in diff screen resolutions it may not work. I'm at 1280*1024. You'd need to change coordinate to proper screen locations if it doesn't function on your machine.
Last edited by drb on Wed Feb 07, 2007 12:24 pm, edited 1 time in total.
Adapted from Mike's Browser select script, with following shortcut features:
Undo - u
Redo - i (the only one wich doesn't seem to work, dunno why)
Remove Stop Button - o
Toggle Pen Mode - p
Toggle Track, Clip View - t
Duplicate -d
Sixteen Note QUantization - 6
Eight Note Quantization - 7
Quarter Note Quantization - 8
1 Bar Quantization - 0
From Session To Browser - b
From Browser to Devices -n
From Devices To Session - m (sometimes you must hit m twice to go up to session slots)
;This script is made for a 17 inch widescreen monitor at 1440 x 900 Pixels
;at full screen ( F11 ). You will probably have to modify it if
;you are using a different resolution.
;
;
GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:00000000
GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:02BB05FD
GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:02FF0351
curMode := 1
return
#IfWinActive, ahk_group Live
{
CoordMode,Mouse,Relative
;Browser
;open browser
2::Click 21,91
;select Lives devices
1::Click 21,116
;Select vst devices
q::Click 21,139
;select File browser 1
a::Click 21,163
;select File browser 2
z::Click 21,187
;select File browser 3
x::Click 21,211
;to session
f::Click 482,93
Shift::Click 482,102
;To Devices
;select device
Space::Click 36,717
;To Undo
u::^z
;To Redo
i::^+z
;Remove Stop Button
o::^e
;Toggle Pen Mode
p::^b
;Toggle Track, Clip View
t::+Tab
;To Duplicate
d::^d
;Sixteen Note QUantization
6::^6
;Eight Note Quantization
7::^7
;Quarter Note Quantization
8::^8
;1 Bar Quantization
0::^0
;From Session To Browser
b::!Left
;From Browser to Devices
n::!Down
;From Devices To Session
m::!Up
}
cheers
coelho
Undo - u
Redo - i (the only one wich doesn't seem to work, dunno why)
Remove Stop Button - o
Toggle Pen Mode - p
Toggle Track, Clip View - t
Duplicate -d
Sixteen Note QUantization - 6
Eight Note Quantization - 7
Quarter Note Quantization - 8
1 Bar Quantization - 0
From Session To Browser - b
From Browser to Devices -n
From Devices To Session - m (sometimes you must hit m twice to go up to session slots)
;This script is made for a 17 inch widescreen monitor at 1440 x 900 Pixels
;at full screen ( F11 ). You will probably have to modify it if
;you are using a different resolution.
;
;
GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:00000000
GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:02BB05FD
GroupAdd, Live, ahk_class Afx:00400000:0:00000000:01900015:02FF0351
curMode := 1
return
#IfWinActive, ahk_group Live
{
CoordMode,Mouse,Relative
;Browser
;open browser
2::Click 21,91
;select Lives devices
1::Click 21,116
;Select vst devices
q::Click 21,139
;select File browser 1
a::Click 21,163
;select File browser 2
z::Click 21,187
;select File browser 3
x::Click 21,211
;to session
f::Click 482,93
Shift::Click 482,102
;To Devices
;select device
Space::Click 36,717
;To Undo
u::^z
;To Redo
i::^+z
;Remove Stop Button
o::^e
;Toggle Pen Mode
p::^b
;Toggle Track, Clip View
t::+Tab
;To Duplicate
d::^d
;Sixteen Note QUantization
6::^6
;Eight Note Quantization
7::^7
;Quarter Note Quantization
8::^8
;1 Bar Quantization
0::^0
;From Session To Browser
b::!Left
;From Browser to Devices
n::!Down
;From Devices To Session
m::!Up
}
cheers
coelho
http://soundcloud.com/coelho
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.
Dave Smith Prophet 08 SE, Genelecs, RME Multiface, Faderfoxes, Doepfer Drehbank, Padkontrol, DIY Footcontroller, Electro Harmonix Pedals.