Does anyone know how to perform an "undo" from within a script?
Miki
undo
Moderator: Paul Tuersley
When saying undo, do you mean you want to be able to undo your script?
If so, just put these lines and the beginning and end of your script.
app.beginUndoGroup("Your undo text here");
//put your script in between here
app.endUndoGroup();
If so, just put these lines and the beginning and end of your script.
app.beginUndoGroup("Your undo text here");
//put your script in between here
app.endUndoGroup();
No, I mean I actually want to do the undo from within my script!
I want to make a GUI which includes its own "undo" button.
Any ideas?
I want to make a GUI which includes its own "undo" button.
Any ideas?
Last edited by miki on January 17th, 2005, 10:26 am, edited 1 time in total.
Sorry, nothing comes to mind on that. You are wanting to undo a normal AE action that was done before the script was launched? I'll let you know if I run across anything. This would be a good application for a scriptlistener like Photoshop has.
Just a thought but you could parse the bits you wish to effect and save those as vars for a "return to default" type button.
You can take a look at the calculator script I created. Perhaps the memory add/return/clear bits will help you get some sort of internal undo buffer for your script
You can take a look at the calculator script I created. Perhaps the memory add/return/clear bits will help you get some sort of internal undo buffer for your script