Skip to main content
jduncan
Adobe Expert
July 14, 2022
Answered

Exit status of built-in command dialog

  • July 14, 2022
  • 1 reply
  • 553 views

Is there any way to get the exit status of a dialog tied to a built-in command? Take the script below...

// do some stuff
app.executeMenuCommand("Path Blend Options");
// do some more stuff

If the user cancels the built-in dialog that pops up for "Blend Options" I don't want to continue with "do some more stuff". I have looked through tons of ExtendScript Debugger variables and the docs, and I can't seem to figure it out.

 

Thanks in advance for your help!

This topic has been closed for replies.
Correct answer m1b

Hi @jduncan, I couldn't find a way. It might not be possible.

 

One crazy idea hack I thought of, that should work, was to export the selection, eg. Document.exportSelectionAsAi(tempFile) before and after the dialog and compare them: assume if they are identical in content that the user cancelled the dialog? Maybe SVG would be better because easier to compare.

- Mark

1 reply

m1b
m1bCorrect answer
Adobe Expert
July 14, 2022

Hi @jduncan, I couldn't find a way. It might not be possible.

 

One crazy idea hack I thought of, that should work, was to export the selection, eg. Document.exportSelectionAsAi(tempFile) before and after the dialog and compare them: assume if they are identical in content that the user cancelled the dialog? Maybe SVG would be better because easier to compare.

- Mark

CarlosCanto
Adobe Expert
July 14, 2022

that is one crazy idea Lollll

m1b
Adobe Expert
July 14, 2022

Haha @CarlosCanto, I'm so tempted to mark your answer as Correct!