Skip to main content
Inspiring
March 17, 2025
Question

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

  • March 17, 2025
  • 1 reply
  • 207 views

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?

 

1 reply

Stephen Marsh
Community Expert
Community Expert
March 17, 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;

 

javaerAuthor
Inspiring
March 17, 2025

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.