undo

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
miki
Posts: 17
Joined: December 20th, 2004, 10:48 am
Location: London, UK
Contact:

Does anyone know how to perform an "undo" from within a script?

Miki
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

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();
miki
Posts: 17
Joined: December 20th, 2004, 10:48 am
Location: London, UK
Contact:

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?
Last edited by miki on January 17th, 2005, 10:26 am, edited 1 time in total.
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

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.
Impudent1
Posts: 57
Joined: June 12th, 2004, 6:40 pm

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
Post Reply