Sign in to follow this  
Followers 0
spel565

Help with script

4 posts in this topic

If i press the button "Retry" i want the script to restart, how?

$answer = msgbox(2+512+32,"", "What to do?")  ;RETURN VALUES: ;CANCEL 2 ;ABORT 3 ;TRY AGAIN 10 ;RETRY 4 ;IGNORE 5  If $answer = 2 Then     MsgBox(0, "-", "OK.  Bye!")     Exit EndIf If $answer = 5 Then     MsgBox(0, "Yay!", "You did it :P")     Exit EndIf If $answer = 4 Then     $bLoop = 1     Exit EndIf

msgbox no0b.au3

Share this post


Link to post
Share on other sites



Wrap it in a while loop.

Share this post


Link to post
Share on other sites

Here is an example for you:

If MsgBox(5, "Title", "Do you want to restart this script?") = 4 Then
    If @Compiled = True Then
        Run(@AutoItExe)
    Else
        Run(@AutoItExe & ' "' & @ScriptFullPath & '"')
    EndIf
EndIf

Share this post


Link to post
Share on other sites

Thanks, but im a new to this program so can you tell me more exact what do to?

Or can tell me exactly what should i write to make the thing you said work in my script? (Write in swedish if you want)

Or can someone link a tutorial how do that?

Or can you tell me how to do?

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