Hello, I'm tryingo to use a method app.doSript() to invoke my fuction main() consist of a few steps in ONE UNDO mode, in case to make it undone by one step, so I wrote such line of code: app.doScript(String(main()),ScriptLanguage.JAVASCRIPT,[],UndoModes.ENTIRE_SCRIPT,'main'); I have two questions, I can't answer to myself: 1. script works fine, but there is no ONE undo in edit menu of indesign, why? what is done wrong? 2. why the main() function is invoked corectly and the function main() does it's work after stopping runtime, but an error occurs with blue comunicate if the line looks like this: app.doScript(main(),ScriptLanguage.JAVASCRIPT,[],UndoModes.ENTIRE_SCRIPT,'main'); Runtime Error: Error Code# 30477: Invalid value for parameter 'script' of method 'doScript'. Expected File, String or JavaScript Function, but received nothing. @ file '~/Desktop/ZZZ_horizontalMirror.jsx' [line:42, col:NaN] many thanks in advance for help with understanding the problem 🙂 regards m.
... View more