Skip to main content
tomzag
Inspiring
August 9, 2016
Question

app.doAction() and "Insert stop"

  • August 9, 2016
  • 1 reply
  • 1041 views

Hi guys,

I developed an HTML5 panel that plays actions with app.doAction(actionName, actionSet).

Everything is working fine but if the action contains a "Stop" (added with "Insert stop") there is a problem:

The stop message pops up but if the user click "Stop" the rest of the action will be played.

If you run this action from the actions panel after clicking on "Stop" the action will stop and the user can do something (draw a selection or something else). After that a click on the play button runs the rest of the action.

Is there a workaround to emulate this behaviour?

This topic has been closed for replies.

1 reply

DBarranca
Legend
August 11, 2016

Actions and CEP have strange behaviours.

E.g. if your actions use a stop step, it throws a user cancelled error (8007).

You don't need CEP panels to see this. Just run this as a script:

try{

    app.doAction("ActionWithStop", "ActionSet");

} catch(e) {

    alert(e)

}

On Mac this exception is ignored in the CEP evalScript call, but not in plain extendscript. On Windows it is not ignored in CEP's evalScript call.

I'm not sure this is directly related to your issue, but it's worth mentioning anyway.

Cheers,

Davide Barranca

tomzag
tomzagAuthor
Inspiring
August 11, 2016

Thanks Davide.

The project where I need this: Home - ActionBrowser CC – Photoshop Panel

Catching the error unfortunately does not help me there ...

My plugins: https://plugins.pixelsucht.net/