Skip to main content
Lordrhavin
Inspiring
August 11, 2023
Answered

Can I group reverting (undo) to a whole script?

  • August 11, 2023
  • 2 replies
  • 224 views

I have a script that does some magic. However, if I undo it, it undoes every step of the script one by one. Can I somehow tell at the start of the script that this all hould b ONE change for the undo-buffer?

This topic has been closed for replies.
Correct answer Manan Joshi

Call the script using app.doScript method. It will add a single entry for your script in the undo stack. See the method details at the following link

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Application.html%23d1e42253__d1e45802

-Manan

2 replies

m1b
Community Expert
Community Expert
August 11, 2023

Hi @Lordrhavin, see an example of using doScript as @Manan Joshi suggested. - Mark

Manan JoshiCommunity ExpertCorrect answer
Community Expert
August 11, 2023

Call the script using app.doScript method. It will add a single entry for your script in the undo stack. See the method details at the following link

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Application.html%23d1e42253__d1e45802

-Manan

-Manan