Skip to main content
TᴀW
Legend
June 4, 2009
Answered

doScript (UndoModes) breaks InDesign's Undo (CS4)

  • June 4, 2009
  • 1 reply
  • 12409 views

I wrote a little script. To make sure that I can undo it all in one go, I used:

app.doScript(main, undefined, undefined, UndoModes.fastEntireScript,"My script");

Once the script completes, InDesign's regular undo is broken. It no longer undoes separate steps, but will only revert to the point before which the script has been run.

What can I add at the end of the script to return things to normal?

Thanks,

Ariel

This topic has been closed for replies.
Correct answer Harbs.

If you use try/catch in your script, you should probably use

UndoModes.entireScript instead.

The reason is kind of complicated...

HTH,

Harbs

1 reply

Harbs.
Harbs.Correct answer
Legend
June 4, 2009

If you use try/catch in your script, you should probably use

UndoModes.entireScript instead.

The reason is kind of complicated...

HTH,

Harbs

TᴀW
TᴀWAuthor
Legend
June 4, 2009

Well I'll be...

Amazing. That's done the trick.

Thank you!

Ariel