Copy link to clipboard
Copied
Hi,
I had expected there to be lots of people asking this so that suggests that it's either very easy and I am being dumb or it's very hard and that's why no one is trying it.
I would like to run a Javascript function in Photoshop which contains multiple sub-actions. The script runs fine but when I undo I have to undo once for each sub-action to get back to me original state.
How do I run a script so that the entire script counts as a single undo?
Thanks
Either create a snapshop and revert back to it or use suspendHistory()
if(documents.length) app.activeDocument.suspendHistory('History Name', 'functionName()');
Copy link to clipboard
Copied
Either create a snapshop and revert back to it or use suspendHistory()
if(documents.length) app.activeDocument.suspendHistory('History Name', 'functionName()');
Copy link to clipboard
Copied
Perfect, thanks!
Copy link to clipboard
Copied
can you use the same for InDesign? If so, where do you add into the script?