I've just started messing around with some scripts today to incorporate into my Pro tools workflow and need some advice on perfecting this AHK Script.
Using imagesearch I've been able to get my mouse to click a button in the software perfectly, however I'd like to windows key + Click it instead. Below is the code
Code: Select all
+1::
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
MouseGetPos, PrevX, PrevY
loop, 2 ; wait a maximum of 1 seconds (10 * 100ms) for render button to appear
{
ImageSearch, ImX, ImY, 0, 0, A_ScreenWidth, A_ScreenHeight, drums.png
Sleep, 100
} until !ErrorLevel
if ErrorLevel
run Show_Only_Drums_2.ahk
else
Click, %ImX%, %ImY%
MouseMove, PrevX, PrevY
Sleep, 500
if WinExist("ahk_class DigiFloaterClass")
WinKill
Return
Thanks in advance!