Highlighted

Script is interrupted by dialog

New Here ,
Sep 14, 2020

Copy link to clipboard

Copied

I have a script which I would like to run without interruption by any dialogs, processing a number of PSD files. If there are issues/errors along the way I don't care; I just want it to continue. I set "app.displayDialogs = DialogModes.NO;" at the start of the script. However the script is interrupted periodically by popups saying "The disk copy of <file> was changed since you last opened or saved it. Do you wish to update it?" with "Cancel" and "Update" options. Is there any way around this? I want to process several hundred PSDs in my script.

TOPICS
Actions and scripting, Problem or error, Windows

Views

70

Likes

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

Script is interrupted by dialog

New Here ,
Sep 14, 2020

Copy link to clipboard

Copied

I have a script which I would like to run without interruption by any dialogs, processing a number of PSD files. If there are issues/errors along the way I don't care; I just want it to continue. I set "app.displayDialogs = DialogModes.NO;" at the start of the script. However the script is interrupted periodically by popups saying "The disk copy of <file> was changed since you last opened or saved it. Do you wish to update it?" with "Cancel" and "Update" options. Is there any way around this? I want to process several hundred PSDs in my script.

TOPICS
Actions and scripting, Problem or error, Windows

Views

71

Likes

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
Sep 14, 2020 0
Most Valuable Participant ,
Sep 14, 2020

Copy link to clipboard

Copied

That does not sound like it is a dialog for some command dialog your script uses. It sound like some command your  script executed ran into some condition it did not have a default way to handle. perhaps if you enclose the code try catch you can catch  this problem and have a default way to handle the problem. You may just want to ignore or take some action.

JJMack

Likes

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
Reply
Loading...
Sep 14, 2020 0
Adobe Community Professional ,
Sep 15, 2020

Copy link to clipboard

Copied

Instead of the command
app.activeDocument.save();

use
var d = new ActionDescriptor();
d.putPath(stringIDToTypeID("in"), app.activeDocument.path);
executeAction(stringIDToTypeID("save"), d, DialogModes.NO);
 
UPD.
Which command in your script causes the message to appear?
 
 
 
 

Likes

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
Reply
Loading...
Sep 15, 2020 1
New Here ,
Oct 20, 2020

Copy link to clipboard

Copied

Hi JJMack,

sorry for taking so long to reply. So many things to do in my busy life, or at least that's what I tell my boss. You are quite right, try{} and catch{} blocks were all that were needed to resolve this. Thanks for the advice on this.

Unfortunately there are other popups which are causing me grief now, which are not suppressed either by the DialogModes.NO option or exception handling. One of them is the "Cannot locate linked assets" window, which according to Adobe is a fixed problem:

 

https://feedback.photoshop.com/conversations/photoshop/photoshop-suppress-cant-locate-link-assets-di...

 

Unfortunately in 2020 it seems to me that this problem is back. I also get "Unknown error" popups and others. So I basically have to handhold my script, checking every few minutes and restarting it if necessary. But that's OK, I'm getting through them. Please let me know if there is anything else I can do though.

 

Phil

Likes

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
Reply
Loading...
Oct 20, 2020 0