In the Windows Task Scheduler, I can run Audacity at 3:48 and then at 3:50, automatically starting Python recording.
However, sometimes there is an error in the task schedule. Or the Audacity.ece application freezes, it is usually described in the schedule as error 0xFFFFF. Then the automatic recording doesn’t start either and I have to manually stop the program and restart manually. Today, for example, it supposedly started automatically, started recording, but after a while it also crashed and recording stopped, I only noticed it after a few hours.
Sometimes it also happened that the application opened automatically without errors, but the 0x1 error caused Python to be automatically recorded.
Is the problem with Audacity or with my system? Does anyone know how to deal with this topic?
I will add that often everything starts correctly, these errors occur from time to time.
Hope the translation is quite correct and understandable
The python.py file is written like this, I am pasting it below. It usually works. It happens, however, that it will not start, for which, I do not know.
And the crash of the application itself at startup is a different problem.
import of os
import sys
if sys.platform == 'win32':
print ("pipe-test.py, running on windows")
TONAME = '\\\\. \\ pipe \\ ToSrvPipe'
FROMNAME = '\\\\. \\ pipe \\ FromSrvPipe'
EOL = '\ r \ n \ 0'
else:
print ("pipe-test.py, running on linux or mac")
TONAME = '/tmp/audacity_script_pipe.to.' + str (os.getuid ())
FROMNAME = '/tmp/audacity_script_pipe.from.' + str (os.getuid ())
EOL = '\ n'
print ("Write to \" "+ TONAME +" \ "")
if not os.path.exists (TONAME):
print ("..does not exist. Ensure Audacity is running with mod-script-pipe.")
sys.exit ()
print ("Read from \" "+ FROMNAME +" \ "")
if not os.path.exists (FROMNAME):
print ("..does not exist. Ensure Audacity is running with mod-script-pipe.")
sys.exit ()
print ("- Both pipes exist. Good.")
TOFILE = open (TONAME, 'w')
print ("- File to write to has been opened")
FROMFILE = open (FROMNAME, 'rt')
print ("- File to read from has now been opened too \ r \ n")
def send_command (command):
"" "Send a single command." ""
print ("Send: >>> \ n" + command)
TOFILE.write (command + EOL)
TOFILE.flush ()
def get_response ():
"" "Return the command response." ""
result = ''
line = ''
while line! = '\ n':
result + = line
line = FROMFILE.readline ()
#print ("I read line: [" + line + "]")
return result
def do_command (command):
"" "Send one command, and return the response." ""
send_command (command)
response = get_response ()
print ("Rcvd: <<< \ n" + response)
return response
def run ():
do_command ("Record1stChoice:")
run()
I can, but I doubt it will change anything. With normal operation, the program starts in a second and is basically ready to run. And here are 2 minutes from starting the program to the start of recording. I have never encountered a crash of Audacity when I run it manually from the desktop.
Can it be done somehow from Audacity? I would like to add that sometimes after unsuccessful start of recording, I run the script again and recording starts without any problems. But sometimes Audacity freezes.
I’m using version 2.3.3 - but I don’t know if it matters in this situation.
I will try. It is a pity that Audacity does not have such an additional option to start recording when the program is turned on But I know that my case is quite specific …