Skip to content

Instantly share code, notes, and snippets.

@wrightwriter
Created March 2, 2023 13:51
Show Gist options
  • Save wrightwriter/e4befc179cd1a3624495e91ec3431b1e to your computer and use it in GitHub Desktop.
Save wrightwriter/e4befc179cd1a3624495e91ec3431b1e to your computer and use it in GitHub Desktop.
#SingleInstance, Force
^Space::
{
if(!WinActive("ahk_exe Bitwig Studio.exe")){
return
}
MouseGetPos X, Y
Y_target := Y
; Y_target -= A_Index
X_target := X
Yb := Y_target
Yb -= 1200
Xb := X_target
Xb -= 5
if (Yb < 150){
Yb := 150
}
PixelSearch, Px, Py, %X_target%, %Y_target%, %Xb%, %Yb%, 0x141414, 3, Fast
if ErrorLevel{
; return
} else {
MouseMove, Px, Py - 5, 0
MouseClick, left,,,,0
MouseMove, X, Y,0
SendEvent, {Space}
; return
}
return
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment