Ozzzi Posted October 20, 2009 Share Posted October 20, 2009 (edited) Hi all,A quick query that I couldn't find any more documentation on:Q: Am I right to assume under the msgbox return value of 1 (OK), nothing is necessary in order to proceed processing the script?Under the return value of 2, I wish to cancel/exit the script, so I figured exit would do just nicely. However, I couldn't find out what to do for 1; is it bad scripting to leave it blank? Select Case $iMsgBoxAnswer = 1 Case $iMsgBoxAnswer = 2 Exit EndSelectMany thanks for your time. Edited October 20, 2009 by Ozzzi Link to comment Share on other sites More sharing options...
jvanegmond Posted October 20, 2009 Share Posted October 20, 2009 (edited) Hi all, A quick query that I couldn't find any more documentation on: Q: Am I right to assume under the msgbox return value of 1 (OK), nothing is necessary in order to proceed processing the script?A: Nothing is necessary, no matter what the return value is. You, as programmer, have complete control what you do. Under the return value of 2, I wish to cancel/exit the script, so I figured exit would do just nicely. However, I couldn't find out what to do for 1; is it bad scripting to leave it blank? Select Case $iMsgBoxAnswer = 1 Case $iMsgBoxAnswer = 2 Exit EndSelect Many thanks for your time. Either: Select Case $iMsgBoxAnswer = 2 Exit EndSelect Or just: If $iMsgBoxAnswer = 2 Then Exit Edited October 20, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Ozzzi Posted October 20, 2009 Author Share Posted October 20, 2009 Thank you, Manadar. That last option, If $iMsgBoxAnswer = 2 Then Exit ..is appealing; simple is beautiful. I think I might utilise that. Thank you again and thanks for such a well documented program, for a programmer, I am not.. Link to comment Share on other sites More sharing options...
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