suplada Posted October 31, 2008 Posted October 31, 2008 Hi Guys! I used a Msgbox with "1" flag in my script, but when I ran the script and clicked on the Cancel button, the script continues to be executed. How can I cancel the script by clicking on the cancel button? Really need help! Thanks!
Mobius Posted October 31, 2008 Posted October 31, 2008 (edited) Yo suplada,Try This::$MsgRet = MsgBox(1,"Hello "& @USERNAME,"Would you like to continue?") IF $MsgRet = 2 THEN EXIT MsgBox(0,"","You clicked ok") If you check out the helpfile on MsgBox() You will see that the cancel button returns with a msg code of 2.By allocating a variable to the return value of MsgBox, you can retrieve and use these msg codes.Vlad Edited October 31, 2008 by Mobius AnonymousX 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now