FinalVersion Posted May 12, 2009 Share Posted May 12, 2009 Current Code: $TStart = TimerInit() ;Main Loop While 1 $Timer = TimerDiff($TStart) If $Timer = 1000 Then MsgBox(0, "", "Time!!") EndIf Sleep(30) WEnd I would put the timerinit in the loop but then that would keep resetting it. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Dampe Posted May 12, 2009 Share Posted May 12, 2009 $TStart = TimerInit() ;Main Loop While 1 $Timer = TimerDiff($TStart) If $Timer >= 1000 Then MsgBox(0, "", "Time!!") EndIf Sleep(30) WEnd Considering there is a sleep(30) there, it would be impossible to get an exact value of 1000, so use >= instead of = Link to comment Share on other sites More sharing options...
Spiff59 Posted May 12, 2009 Share Posted May 12, 2009 With your prior post regarding multiple timers, I'd think you'd want to be resetting your timers in the loop via TimerInit() $TStart1 = TimerInit() $TStart5 = TimerInit() ;Main Loop While 1 If TimerDiff($TStart1) > 1000 Then ToolTip("Timer1") Beep(600,50) $TStart1 = TimerInit() EndIf If TimerDiff($TStart5) > 5000 Then ToolTip("Timer5") Beep(900,50) $TStart5 = TimerInit() EndIf ToolTip("") WEnd Link to comment Share on other sites More sharing options...
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