Suppress Warning in a script playing an Action

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

ApWizard

Suppress Warning in a script playing an Action

Post by ApWizard »

Hi guys!
I would like to suppress the warnings coming up while launching an Action from a script.
I've tried various versions of displayDialogs to no avail.

The Action basically delete some Channels, I can do that with a script but deleting 32 channels is very slow (the action take a split second to do it).
The problem is, maybe my 32 named channels are not there so the Action will pop-up a message with a Warning.
Is there something like VBA "on error resume next" in PS/Javascript?

Thank you in advance
ApWizard

Suppress Warning in a script playing an Action

Post by ApWizard »

So I'm thinking about some solutions:
• Checking if my channels are actually there and launch the action accordingly;
• ScriptListening me while deleting the channels and try a try()catch()

I've another issue about slowness while creating alpha channels.
If I script the creation of 32 alpha named channels (selection.load, selection.store) it takes ~30seconds, a recorded action of the same procedure take ~3/4seconds.
Is there a way to access a low level procedure while scripting to make things move faster?