scripting - Photoshop script - suppressWarnings, disable error dialogs -


i have script.jsx photoshop, exports stuff many psd files. (1 in 20 files), upon opening psd file, following dialog shows up:

var filetoopen = new file(...); open(filetoopen); 

annoying dialog

i'm running script on hundreds of files, , need somehow ignore dialogs. "keep layers" ok, in general, prevent dialog help.

i've found in manual option suppresswarnings, available pdfopenoptions or photoshopsaveoptions - there no such thing psdopenoptions or photoshoploadoptions, neither simple object {suppresswarnings: true} work. have tried adding displaydialogs = dialogmodes.no doesn't either.

is there way prevent dialog? (ie. stop blocking script's execution)

try try catch construction. if not help, set user interaction (though may cumbersome): https://forums.adobe.com/thread/289239?tstart=0

example:

app.scriptpreferences.userinteractionlevel = userinteractionlevels.neverinteract; var filetoopen = new file(...); open(filetoopen); app.scriptpreferences.userinteractionlevel = userinteractionlevels.interactwithall;  

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -