Jump to content
Sign in to follow this  
Robin

time testing

Recommended Posts

Robin

Could anyone maybe explain why this doesnt work?...sorry for the stupid question :D

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 by Robin

Share this post


Link to post
Share on other sites
MrMitchell

Put:

$var1 = @HOUR

$var2 = @MIN

Inside the While loop?

Edit: LoL Manadar beat me to it :D

Edited by MrMitchell

Share this post


Link to post
Share on other sites
Robin

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

:o

Manadar...once again youre my hero....thx mate :D

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  

×