I'm running my python script through mod-script-pipe on v3. The script sends many small actions.
When something goes wrong user can undo the actions in Audacity manually. My question...
Is it possible to send those actions as a kind of block so that each undo would revert a block of actions?
Can I bundle mod-script-pipe actions for Undo?
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Re: Can I bundle mod-script-pipe actions for Undo?
The way that I've done in the past is to send "Undo:" the required number of times (with a loop).
Check the commands by running through them manually. The number of "Undo"s required can be tricky to get right because some actions don't create steps in the history.
Another way might be to create a Macro for a block of commands. A macro "should" be one step in the Undo History (this isn't perfect yet, so you will need to check manually). You can then send, from Python, a command to run the macro, followed by one "Undo" to undo all the steps in the macro.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: Can I bundle mod-script-pipe actions for Undo?
Thanks Steve.
I think I leave this for the moment. I was hoping that I could send a kind of Undo-begin and Undo-end to bundle the actions
I think I leave this for the moment. I was hoping that I could send a kind of Undo-begin and Undo-end to bundle the actions