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

Save file with script (skip warning 'modified outside Illustrator')

Explorer ,
Apr 04, 2015 Apr 04, 2015

Copy link to clipboard

Copied

Hi All,

We all know that command:

app.activeDocument.save();

saves the document skipping all the dialogs and even alert that is popping out every time when you manually saving your file on a server:

Screen Shot 2015-04-04 at 11.03.58.png

My issue is that I am working on PDF files (with preserved Illustrator editing capabilities) almost all the time rather than .ai files, and everytime I use

app.activeDocument.save();

The .ai file is created.

My question is if it's possible to save PDF that you're working on same as you would manually 'Save' from the menu context, ommiting that annoying dialog about modified file?

Regards

Peter

TOPICS
Scripting

Views

864

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

correct answers 1 Correct answer

Explorer , Jun 23, 2015 Jun 23, 2015

Hi Carlos,

Almost there!

I managed to do it with:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

app.executeMenuCommand ('save');

app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;

Thanks again!

Votes

Translate

Translate
Adobe
Engaged ,
Apr 04, 2015 Apr 04, 2015

Copy link to clipboard

Copied

You should be able to "SaveAs",  specifying the PDF as the type and choosing to not invoke the dialog box.

Hope this helps!  -TT

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
Explorer ,
Jun 23, 2015 Jun 23, 2015

Copy link to clipboard

Copied

@

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 ,
Jun 23, 2015 Jun 23, 2015

Copy link to clipboard

Copied

if you have CS6 or newer, use

app.executeMenuCommand ('save');

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
Explorer ,
Jun 23, 2015 Jun 23, 2015

Copy link to clipboard

Copied

LATEST

Hi Carlos,

Almost there!

I managed to do it with:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

app.executeMenuCommand ('save');

app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;

Thanks again!

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