FR: Task Scheduler, Win 7, Audacity 1.3 Beta

I transferred the above from the Windows/1.3 section of the forum.

The original psot was a request for a mutlti-event scheduler for timer Record. I added the poster’s vote to the Wiki’s FR page and to the proposal for Timer Record extensions: Missing features - Audacity Support

WC

This is probably quite trivial to accomplish; see this thread for the basics:

add a new CLI switch -doStartRecording (or whatever you like) and -doStopRecording (the matching functions are in Menus.cpp (OnRecord & OnStop). If you need help getting Audacity compiled just ask and I will get you up and running. If the programming is too difficult I can help with that as well.


“called from the task manager” ???

This would also be doable if you had CLI switches: -startTime & -recordLength plus -saveName
but getting the saveName parsed given spaces are allowed would be a bit tricky. One option would be to not allow spaces (but remember this has to be a fully qualified path: x:foldername.extension) in the supplied name; another would be to require that -saveName be the last switch with everything following (spaces and all) being the string composing the fully qualified path.

When I first looked at these posts I thought to myself: “Gee, did I post this all way way back in January?”… (-:

I have download3ed and installed the AutoIt program.

Lotza information here, lots to sift through. It has been 20 years that I have programmed in C but have done a lot in VB so I at least have some retention in data structures and added recently Visual C++ experience.


Time to dive in, I will come back if/when I get stuck and will watch for replies…
Thanks…

(Guess I don’t see an option to reply to your post without quoting it, can the be done?)

Actually, AutoIt looks much simpler than I thought it would be. I guess I have to dust off my 15 years of experience in DOS. (Do you remember Recover.exe?) I did not realize that there was no AutoIt screen and found the right-click option to open the editor. It is reminiscent of the HTML editor… While installing, it gave me the help screen but am hesitant to close it as I don’t see any option to open it again.

Ok, before I get too far off topic for this forum: Can you give me some code to tweak? It looks like it will be scarcely a line or two in a file to start the Audacity recorder at 6:29 am and another file to stop it at 6:31 am. I am sure I will be able to edit the times in the sample script. Also, an example of the command line to invoke it would be appreciated.

It looks like this idea is going to be quite useful in other areas too.
Thanks for your assistance.

P.S. I hope this did not get posted twice, I seemed to have lost my first version…

Since the full answer is off-topic I will reply in a PM (private message), but in short you may edit the quote down to nothing but will always start with a full quote.

I will watch for it.
Thanks

sent PM…

When you ask for code

were you asking for AutoIt code (a script) or changes to the Audacity code-base?

Installing AutoIt3 adds a folder to your Start button’s All Programs list:
ai3.png
The help file is accessible from there as is the editor.

Since the details are very much off topic in this board of the forum we should move the detailed discussion to your other post or to a new topic in the “General Audio Programming” board (probably the best place for it).

Microsoft packs that list with so much trash that I rarely even look there anymore but thanks for the note. At least I can now close the help window (-:

As for drifting off topic, I figured that it was exactly on as it concerns scheduling the event. Would this not actually cause two discussions happening on the same topic? Machs Nix, I will check back in a few before I repost.

Thanks…

“were you asking for AutoIt code (a script) or changes to the Audacity code-base?”

Either one but it looks like the scheduler code would work better. All I need is to know what line of code would work in AutoIt that directly activates Audacity as a given time. Once I have a segment of working code, I can exit/modify it to fit my Audacity needs.

Audacity based code would certainly be welcome.

I know what you mean–I frequently go in and trim it down!

Theoretically (AFAIK), this board is strictly for discussing adding features to Audacity’s code, not extending Audacity’s ability via outside apps. Controlling Audacity via AutoIt is not on topic here.

If I posted code changes to the Audacity code-base to make Audacity do a new trick (f.i. recording to a schedule) it would be topical here.

The concept here is we really have two topics–changing Audacity’s code internally to somehow accomplish your goal and driving Audacity via an external scripting system. How about this, for the AutoIt stuff I will start a new topic over in General Audio Programming:

which I will flesh out as I go (I will need to figure out the details as I have never used Task Scheduler).

For the CLI-based stuff I refer any interested reader to the thread:

where I show how to add new CLI switches. Anyone interested in going this route should first get Audacity compiling and running then follow the steps to get new CLI switches working. Ask me questions as needed up to that point; adding the start & stop switches is really trivial once you get that far.

Good stuff, thanks