Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to close InDesign with a script?

New Here ,
Apr 25, 2017 Apr 25, 2017

(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?

TOPICS
Scripting
3.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 25, 2017 Apr 25, 2017

Hi,

Try this..

app.activeDocument.close(SaveOptions.no);

Thanks,

Prabu

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 25, 2017 Apr 25, 2017

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 25, 2017 Apr 25, 2017

Thank you! That's exactly what I was looking for!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Apr 26, 2017 Apr 26, 2017
LATEST

[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 ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines