spel565 Posted August 19, 2009 Posted August 19, 2009 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 EndIfmsgbox no0b.au3
somdcomputerguy Posted August 19, 2009 Posted August 19, 2009 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.
lordicast Posted August 19, 2009 Posted August 19, 2009 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]
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