I'm brand new to scripting in Photoshop and coding in Java, and I need help. I want to ask the user a question and if they say "yes" I want the script to completely stop. If "no" I want it to continue.
Is there a way to do this? I've seen examples that look like this one below using "return", and they all say it will work. But all that does is stop the function, not the entire script.
=============
function EndScript() {
return;
alert('this line will never execute');
}
var PromptUser = confirm("Do you want to stop?");
if(PromptUser ){
EndScript();
}
alert("If the user clicks yes, I don't want this line to execute.");
=============
Isn't there some kind of statement that will just stop everything?
Thanks for your help.