Jump to content

timer not working


Recommended Posts

the message box did not set off as intended. Please help solve me problem.

thanks in advance.

#Include <Timers.au3>
$i = 1
$begin = TimerInit()
while $i = 1 
do

$dif = TimerDiff($begin)
if ($dif=3000) then 
    
     MsgBox(4096, "Test", "culalalallla")
     $begin = TimerInit()
     
Endif
until $i = 9
WEnd
Link to comment
Share on other sites

the message box did not set off as intended. Please help solve me problem.

thanks in advance.

#Include <Timers.au3>
$i = 1
$begin = TimerInit()
while $i = 1 
do

$dif = TimerDiff($begin)
if ($dif=3000) then 
    
     MsgBox(4096, "Test", "culalalallla")
     $begin = TimerInit()
     
Endif
until $i = 9
WEnd

Prolly because the odds of hitting 3000 on the dot when it goes that fast are pretty slim. Just a guess, but try

If $dif > 3000 Then

That way even if it goes to 3001 mmilliseconds, it will catch it, but not miss it.

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...