質問

I've run into an issue with the automation of one of my Photoshop scripts where it can be completely halted by an error in a supporting action set. The script does about 99% of the work, but the remaining 1% has to be done in an action due to the work being done (the work is NOT scriptable, or at least not efficient in the least to put to script). The problem I'm running into is that, if there is an error in the layer name in the action, Photoshop pops up an alert about the issue, halting the whole process until I click the "Ok" button on said alert.

Is there any way to catch these errors (a simple try/catch on the action activation code doesn't work), or at least suppress the errors so they don't halt the entire process? Thanks in advance for any help!

Edit: Correction on the error type; it's not an "Ok" alert, it's a "Continue/Stop" alert. The message accompanying it is "The object "layer "layerName"" is not currently available". This happens if the person creating the action failed to rename the layer before performing their work on it and halts the entire automation process until I click continue or stop.

役に立ちましたか?

解決

You should convert the action to a script using ActionToJavascript.jsx. After which you can then modify the script to look out for errors - such as you mentioned with the layers not being named correctly.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top