Copy link to clipboard
Copied
(Windows 7, Adobe Indesign CC 2017)
I'm running an InDesign JavaScript script and am wondering what the command to close the InDesign application after the script is done running is. I've found commands to close the current document after the script has completed, but is there a way to close the actual application itself?
Copy link to clipboard
Copied
Hi,
Try this..
app.activeDocument.close(SaveOptions.no);
Thanks,
Prabu
Copy link to clipboard
Copied
You are looking for app.quit(): InDesign ExtendScript API (12.0)
No surprise there, but I never have used it and so I find myself wondering how it's going to work. After all, a script runs inside of InDesign. So what does happen when it issues a "quit" command ... and more code follows that line?
Copy link to clipboard
Copied
Thank you! That's exactly what I was looking for!
Copy link to clipboard
Copied
[Jongware]-GfBROo​ A long long time ago there was that indesign weird bug that could be solved by quitting indesign and restarting it manually. I naively thought at the time that a script could both quit and relaunch indesign. Unsurprisingly the script couldn't fix the issue teh same way as InDesign seemed to be somehow kept alive (or in the limbs) if the quit call was made prior to further script commands.
Confusing to say the least. I meant it would make sense the script stops at the quit command line but in the script the script was considered to the end. So maybe the close call is delayed until a script actually ends ?