This is kinda...an ugly alternative, but it works at least.
Code:
process, exist, audacity.exe
if errorlevel
myPID := ErrorLevel
else
{
Msgbox No Audacity process was found running. Exiting...
ExitApp
}
;
HiddenMode = -1
left::
HiddenMode *= -1
if HiddenMode = 1
WinSet, Transparent, 0, ahk_pid %myPID%
else
{
WinSet, Transparent, 255, ahk_pid %myPID%
WinSet, Transparent, Off, ahk_pid %myPID%
}
return
up::
WinActivate, ahk_pid %myPID%
ControlSend, , r, ahk_pid %myPID%
WinMinimize, ahk_pid %myPID%
return
down::
WinActivate, ahk_pid %myPID%
ControlSend, , {Space}, ahk_pid %myPID%
WinMinimize, ahk_pid %myPID%
return
You can assign up to controlsend r to audacity, but it will do nothing unless Audacity has focus. I don't think there's any way around that. Also, it won't work with WinHide/WinShow either...and, strangely, I can't unhide the window with WinShow using the PID.