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.
if (app.showColorPicker()) { do more cool stuff } else { stop };
Copy link to clipboard
Copied
if (app.showColorPicker()) { do more cool stuff } else { stop };
Copy link to clipboard
Copied
Thank You, I have to admit I was not not aware of stop
Copy link to clipboard
Copied
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".