Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save X-Raym/36e10a0932f84fb06e51f41e858c8be4 to your computer and use it in GitHub Desktop.
Save X-Raym/36e10a0932f84fb06e51f41e858c8be4 to your computer and use it in GitHub Desktop.
Run REAPER Scripts from VSCode via AHK and mapped KeyBoard shortcut
#Warn ; Enable warnings to assist with detecting common errors.
#Requires AutoHotkey v2.0 ;
#SingleInstance ;
Msg(str) {
ToolTip( str )
SetTimer( ToolTip, -1000 )
return
}
F7::{
if WinActive("ahk_exe Code.exe") {
WinActivate ; Use the window found by WinExist.
Send '^s' ; save file
}
Sleep 200
Msg("switch")
if WinExist("ahk_exe reaper.exe") {
WinActivate ; Use the window found by WinExist.
ControlFocus("REAPERTrackListWindow1")
Send '^+r' ; refresh without cache
}
}
F8::{
if WinExist("ahk_exe Code.exe") {
WinActivate ; Use the window found by WinExist.
}
}
F9::{
if WinExist("ahk_exe reaper.exe") {
WinActivate ; Use the window found by WinExist.
}
}
@X-Raym
Copy link
Author

X-Raym commented Jan 29, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment