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

app.showColorPicker(); Cancel

Contributor ,
Nov 17, 2018 Nov 17, 2018

Copy link to clipboard

Copied

Under a button click even, I use the app.showColorPicker(); to show the ColorPicker which fills a layer with the chosen colour. Is there a way to stop the rest of the script running if the user presses the cancel button in the colorpicker dialog.

TOPICS
Actions and scripting

Views

732

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

Nov 17, 2018 Nov 17, 2018

if (app.showColorPicker()) { do more cool stuff } else { stop };

Votes

Translate

Translate
Adobe
Nov 17, 2018 Nov 17, 2018

Copy link to clipboard

Copied

if (app.showColorPicker()) { do more cool stuff } else { stop };

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
Contributor ,
Nov 17, 2018 Nov 17, 2018

Copy link to clipboard

Copied

Thank You, I have to admit I was not not aware of stop

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
Nov 19, 2018 Nov 19, 2018

Copy link to clipboard

Copied

LATEST

That is not real code...just notes for you to add real code in there. You could set a flag to "stop" your process. Cleaning up on your way out for example. Or just put a big if around your code for "keep on going they selected OK in the dialog box".

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