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

How to close InDesign with a script?

New Here ,
Apr 25, 2017 Apr 25, 2017

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?

TOPICS
Scripting

Views

2.7K

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi,

Try this..

app.activeDocument.close(SaveOptions.no);

Thanks,

Prabu

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

Votes

Translate

Translate

Report

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

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?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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 ?

Votes

Translate

Translate

Report

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