Hi forum,
I need to control Audacity when its window is not active. I have already tried SendMessage and ControlSend, but Audacity doesn't really do anything.
I really just need to send "r" or {Space} to Audacity to start or stop a recording, respectively.
Thanks already for any hints how to do this,
David.P
Control Audacity when in Background?
Started by
David.P
, Aug 14 2008 02:16 PM
4 replies to this topic
#1
-
Posted 14 August 2008 - 02:16 PM
This is kinda...an ugly alternative, but it works at least.
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.
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%
returnYou 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.
#2
-
Posted 14 August 2008 - 03:22 PM
Hi and thanks,
does this mean that you set the Audacity window to transparent and then put it foremost...?
If yes, probably it won't work, really -- I need to interact with another program in the foreground at the same time when the recording is started.
Any other ideas, please...?
Thanks already,
David.P
does this mean that you set the Audacity window to transparent and then put it foremost...?
If yes, probably it won't work, really -- I need to interact with another program in the foreground at the same time when the recording is started.
Any other ideas, please...?
Thanks already,
David.P
#3
-
Posted 14 August 2008 - 03:27 PM
None that I can think of, aside from getting a new app to record with. In my tests, Audacity was definitely being sent the 'r' key ('up' wouldn't function as it normally would, and notepad wouldn't receive the 'r', but if Audacity had focus the up key would work like the r key). Audacity won't let you set a global hotkey, either, so I don't know...
#4
-
Posted 14 August 2008 - 05:19 PM
You do not have permission to read this signature...
Thanks very much.
I'll use an old version of CoolEdit then.
Cheers David.P
I'll use an old version of CoolEdit then.
Cheers David.P
#5
-
Posted 14 August 2008 - 05:52 PM



Sign In
Create Account
Last active: Apr 29 2015 09:59 AM
Back to top