Jump to content

Help with script


Recommended Posts

What´s wrong with this script?

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

Link to comment
Share on other sites

This.

C:\Users\Public\msgtest.au3(10,12) : WARNING: $answer: possibly used before declaration.
If $answer =
~~~~~~~~~~~^
C:\Users\Public\msgtest.au3(10,12) : ERROR: $answer: undeclared global variable.
If $answer =
~~~~~~~~~~~^
C:\Users\Public\msgtest.au3 - 1 error(s), 1 warning(s)

For more info, look at the ERROR line..

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Added $answer to msgbox.

$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
[Cheeky]Comment[/Cheeky]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...