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

Hide save error message?

Participant ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

Usually using a try/catch statement will let me hide error messages, but for some reason it's not working for this one:

Unknown-4.png

I've got activeDocument.save() in a try/catch for this exact reason yet it's still displaying this message if it fails. Any idea why?

TOPICS
Actions and scripting

Views

752

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

Adobe Employee , Mar 08, 2017 Mar 08, 2017

What if you add this before the save?

     // remember the dialog modes

     gSaveDialogMode = app.displayDialogs;

     app.displayDialogs = DialogModes.NO;

You could also try to write a temp file to your destination and add logic to handle the "no write access" issue you are facing.

Votes

Translate

Translate
Adobe
Adobe Employee ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

What if you add this before the save?

     // remember the dialog modes

     gSaveDialogMode = app.displayDialogs;

     app.displayDialogs = DialogModes.NO;

You could also try to write a temp file to your destination and add logic to handle the "no write access" issue you are facing.

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
Participant ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

LATEST

Amazing, that's done the trick, thank you!

You could also try to write a temp file to your destination and add logic to handle the "no write access" issue you are facing.

Yup, I am calling a 'force save' function that I wrote in the catch to work around the access error

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