March 18, 200421 yr Newbies Wondering how I can make use of the OK / Cancel buttons when I add a Show Message step to a script. What I want to do is continue the script if the user responds by clicking OK, but abort the script if the user clicks Cancel. I thought if I followed the Show Message step with an If step . . . but I don't know how to refer to the value of the button from the message box. Hoping someone can point me in the right direction . . . Version: v6.x Platform: Mac OS X Jaguar
March 18, 200421 yr Try this... Set Error Capture(On) Show Message("Whatever you want to say") if (status(currentmessagechoice) = 1) OK was pressed, do something here else Exit Script Endif basically the status(currentmessagechoice) returns 1, 2 or 3. 1 is the rightmost button (also the default button, and considered to be the first button), 2 is the next rightmost and 3 is the leftmost button. Hope this helps. Echo
March 18, 200421 yr Author Newbies Thank you very much! So far I just have my script confirming my choice with another message box ( "You answered OK" or "You chose Cancel") and I'm getting the right message box for the right action. So now I can go on and add the actual functions. I really appreciate the help!
Create an account or sign in to comment