Robin Posted March 30, 2009 Posted March 30, 2009 (edited) Could anyone maybe explain why this doesnt work?...sorry for the stupid question Code Start ======= local $var1, $var2 $var1 = @HOUR $var2 = @MIN While 1 If $var1 = 11 and $var2 = 16 Then MsgBox(0,"","Go...") EndIf WEnd ======= Code Stop Edited March 30, 2009 by Robin
jvanegmond Posted March 30, 2009 Posted March 30, 2009 Because the values of $var1 and $var2 stay the same in the loop. Only outside of the loops the values are updated. local $var1, $var2 While 1 $var1 = @HOUR $var2 = @MIN If $var1 = 11 and $var2 = 16 Then MsgBox(0,"","Go...") EndIf WEnd github.com/jvanegmond
MrMitchell Posted March 30, 2009 Posted March 30, 2009 (edited) Put: $var1 = @HOUR $var2 = @MIN Inside the While loop? Edit: LoL Manadar beat me to it Edited March 30, 2009 by MrMitchell
Robin Posted March 30, 2009 Author Posted March 30, 2009 Because the values of $var1 and $var2 stay the same in the loop. Only outside of the loops the values are updated. local $var1, $var2 While 1 $var1 = @HOUR $var2 = @MIN If $var1 = 11 and $var2 = 16 Then MsgBox(0,"","Go...") EndIf WEnd Manadar...once again youre my hero....thx mate
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