Altrez Posted December 8, 2009 Posted December 8, 2009 Hey Guys, I have checked out the forums and looked at the help file however I have an issue that I cant seem to fix. I know it must be easy to do and I was hoping one you you might have some input. I would like to add a Msg box to my script that has a Topic of Continue? And a Button Choice of Yes Or No. If No is pressed I would like for the script to exit at that point. If yes is pressed I would like for the script to finish its run. Can anyone offer any help? Thanks!
Developers Jos Posted December 8, 2009 Developers Posted December 8, 2009 Use MsgBox(), test for the returned value and use If to test and exit the script. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Klexen Posted December 8, 2009 Posted December 8, 2009 (edited) $YesNoBox = MsgBox(4,"Continue?","Would you like to continue?") ;//Yes = 6 no = 7 ... So if they hit yes... It will do whatever you put, if they hit no, it exits. If $YesNoBox = 6 Then MsgBox(0,"","You hit yes") ;Do stuff Else Exit EndIf or $YesNoBox = MsgBox(4,"Continue?","Would you like to continue?") ;//Yes = 6 no = 7 ... So if they hit yes... It will do whatever you put, if they hit no, it exits. If $YesNoBox = 7 Then Exit MsgBox(0,"","You didn't hit no, so you program will continue") Edited December 8, 2009 by Klexen
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