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

Exit status of built-in command dialog

Community Expert ,
Jul 13, 2022 Jul 13, 2022

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
438
Translate
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

Translate
Adobe
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

Translate
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

that is one crazy idea Lollll

Translate
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

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

Translate
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

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

Translate
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 14, 2022 Jul 14, 2022
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!

Translate
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