• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Exit status of built-in command dialog

Engaged ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

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!

TOPICS
Scripting

Views

187

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 13, 2022 Jul 13, 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

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

that is one crazy idea Lollll

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

come to think of it, it doesn't sound that crazy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 14, 2022 Jul 14, 2022

Copy link to clipboard

Copied

LATEST

Ha! Now that's some creative thinking. Knowing the exit status is not critical for the script I'm working on, I just thought it would be a "nice to have" feature. I'll definitely keep this option in mind for any future issues I encounter. Thanks for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines