Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
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.