Sign in to follow this  
Followers 0
Altrez

How to end a script and exit?

3 posts in this topic

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!

Share this post


Link to post
Share on other sites



#3 ·  Posted (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 by Klexen

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0