Task Scheduler no longer talks to Audacity

I will need to see the entire AutoIt3 script(s). Are you saying that you have a command in your script which causes Audacity to be run from a CLI with something (vaguely) like this line:

"DRIVE:folder(s)Audacity.exe" "C:Gork__Scheduled Event ScriptsInitializeAudacityB.au3"

[where DRIVE & folder(s) are, respectively, a drive letter and folders constituting a fully qualified path to your executable of Audacity]?
I would expect that those two quoted strings would need to be scheduled as separate events with the AutoIt3 script being called one or two seconds after the launch of Audacity.

[Aside] To save the overhead and timing issues involved with processing a script it would probably make sense for you to compile your scripts into executables. You compile them from the Tools menu of the SciTE editor.

Just to make sure I understand…this was working for a while with 2.0.6?

yes, This was working last Sunday. Something burped between Monday morning and when I cleaned out the Temp folder and caused all this. No change in Audacity version was involved.

Let me correct my previous post relative to version.

What ever version I had last Sunday was in use for a while and remained in use until a few days later when I uninstalled and installed the 2.0.6 version.

The version in use on Sunday could have been 2.0.5 but I doubt there is anyway for me to know this. I did not download a new version between Sunday and when the problem happened. The update happened after the problem happened.

Could there have been an automatic update? (I doubt it)

No, Audacity does not automatically update. I really need to see all of your scripts – use copy & paste.

Audacity 2.0.6 has only been out for a very short time – unless you are downloading the alpha versions (Nightlys) - the official release was on or about 29 September, just short of three weeks ago.

I presume that you want the au3 files. There are three of them. One to initialize Audacity, one to start recording, the other to stop recording. Audacity remains open until I manually close it. Only one instance of audacity is in use.

===================================================================

Initialize Audacity: InitializeAudacityB.au3
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_x64=getStJI.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: edgar5
Script Function: open Audacity
#ce ----------------------------------------------------------------------------

; Script Start
Run (“C:Program Files (x86)Audacityaudacity.exe”)
WinWaitActive(“Audacity”)

======================================
Start Recording, Send cursor to the beginning of the track, mute all tracks: StartRecording.au3

;; #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
;; #AutoIt3Wrapper_Outfile_x64=getStJI.exe
;; #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: edgar5
Script Function: start recording

#ce ----------------------------------------------------------------------------

; Script Start
SendKeepActive(“Audacity”);you might need this is other windows are being activated at the same time
; WinMenuSelectItem(“”, “”, “Transport”, “Record”)
; I set Record as <ALT + CTRL + SHIFT + R>
;and Stop as <ALT + CTRL + SHIFT + S>
send (“^[”); Send Return-to-beginning-of-track command
send (“^u”); Send U to mute all tracks
Send(“!^+rr”); to start new track recording
; note the exclamation point (!) means ALT, the carat (^) means CTRL and the plus sign (+) means SHIFT

==================================================
Stop Recording: StopRecording.au3

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_x64=getStJI.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: edgar5
Script Function: stop recording in Audacity
#ce ----------------------------------------------------------------------------

; Script Start
WinActivate (“Audacity”)
SendKeepActive(“Audacity”);you might need this is other windows are being activated at the same time
;Send(“!^+rs”)
send (“!rs”);
send (“^u”); Mute all tracks

; note the exclamation point (!) means ALT, the carat (^) means CTRL and the plus sign (+) means SHIFT

============================================================

That’s it and there you have it. Keep in mind that these scripts were working without flaw for several years now.

Since 2.0.6 has only been out for about three weeks do you think you installed it shortly before your problems appeared? If you believe you installed it before your problems began*, did you accept the one-time offer to reset Audacity’s preferences during the install process? Have you tried resetting/initializing Audacity’s preferences since the problem appeared? You may find directions for doing so here:
http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#reset

FYI, when pasting code into this BBS, before doing so click the button just above the text input field which is labeled Code. This will insert a formatting on/off pair:

[code]

[/code]
and set the typing insert point between the pair – paste your code, click after the final close square bracket, press return/enter and continue typing. In this instance, since you had three different scripts you would want to do this three times so that each script was in its own code block.

I know these scripts were working for a long time; however, I note at least a couple of typos. I would also combined the script which opens Audacity and the script which starts it recording.

The first script, if you’re going to use 3 scripts, does not need the “wait for the window to activate” command as there is nothing else for the script to do. If you do use separate Run & Record scripts you stand the chance of running the Record script before Audacity is fully launched and ready to record.

In the second (Record) script

send ("^["); Send Return-to-beginning-of-track command
send ("^u"); Send <ctl>U to mute all tracks
Send("!^+rr"); to start new track recording

The “return to beginning of track” command should be unnecessary as there will be no track at this time; likewise, the mute command is also unnecessary for the same reason. As I pointed out before the “start recording” command has a typo in that there are two of the letter r.

In the third (Stop) script

send ("!rs");

looks suspicious in light of:

Stop as <ALT + CTRL + SHIFT + S>

if in fact your Stop Recording is not:
<alt+r>
the exclamation point (!) means ALT, the carat (^) means CTRL and the plus sign (+) means SHIFT
the trailing s is being sent sequentially so what the program is seeing is:
<alt+r>
which is not valid in Audacity (as a single command – it will be interpreted as two commands).

*I’ll go out on a limb here and make a wild guess as to what is really going wrong… When it was working you were running a version of Audacity which did not display a splash screen (pre-2.0.6). At startup 2.0.6 briefly brings up a small window whose name is “Audacity is starting up…”. AutoIT3, when asked to activate (or wait for the activation of) a window called “Audacity”, will happily accept either “Audacity” or “Audacity is starting up…”. So, if the splash screen is active when your second script starts to run the splash screen window gobbles up all the commands including the Record command. The only way you can prove this would be to compile a custom version of 2.0.6 changing the title of one of the windows so that the first word of each was unique. Alternately, you could reinstall 2.0.5 and see if that resolves the issue; if so, while not a proof, it would be a strong indication that this is the problem. I vaguely recall that you have some background as a programmer; I would be inclined to recompile with unique titles if it were me.

Quite a bit to read and check and I will do so later on this afternoon. However, I did not upgrade to 2.0.6 until after the incident. All this happened in the previous installation. I cannot even think of any changes in the computer between Sunday a week ago and the following Tuesday when all this started.

I have no problem reconstructing the scripts since there may be more efficient ways to do this. I just hope I don’t have to reconstruct all of my settings in the Task Scheduler.

You comment that I don’t need to reset to the beginning and to mute however are they doing any harm?
The pattern I use these three are as follows:

Initialize Audacity (since I what all recordings to happen in one instance of audacity.)
Start recording
stop recording 59 minutes later.
start recording 1 minute later.
stop recording 59 minutes later.
start recording 1 minute later.
stop recording 59 minutes later.

and this continues from 5am until 11pm both Saturdays and Sundays. The times are controlled by the Task Manager.
I shut down the program manually after playing or choosing to save any tracks that I wish to keep.

The Mute All is a convenience for when I choose to play a track during the cycle. This way I don’t have to go to each and mute them.
The reset to the beginning is a convenience for when I stop playing a track and the next recording will start at the beginning of the time line.

Does this help to explain the set up better?

Now that I see the full scope of what you are doing these do make sense and do no harm.

I think you should make a copy of your Audacity configuration file, remove all but the one line in your current configuration file so that it is simply initializedif you need help with these topics look here:
http://manual.audacityteam.org/o/man/preferences.html#stored
http://manual.audacityteam.org/o/man/preferences.html#reset
Then uninstall 2.0.6, reinstall 2.0.5 and try again. If this makes everything work as it was before we can discuss your options.