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

Disable pop-ups or auto-determine to avoid blocking the program

Participant ,
Mar 16, 2025 Mar 16, 2025

When using a script to open a psd file, an error message pops up, asking whether to continue. How can I disable this dialog box or automatically confirm to avoid blocking the program?

javaer_0-1742179773543.png

 

TOPICS
Actions and scripting , Windows
105
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
Adobe
Community Expert ,
Mar 16, 2025 Mar 16, 2025

Presuming  legacy ExtendScript:

 

// Save and set the dialog display settings
var savedDisplayDialogs = app.displayDialogs;
app.displayDialogs = DialogModes.NO;

// Your code here

// Reset the original dialog display
app.displayDialogs = savedDisplayDialogs;

 

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
Participant ,
Mar 16, 2025 Mar 16, 2025
LATEST

I have tried it, but the dialog box still pops up. This may be caused by a loading error, and the setting cannot take effect.

javaer_0-1742183596608.png

 

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