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

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -

c# - Pausing a storyboard on TabItem mouse over -

c# - Attribute value in root node of xml Linq to XML -