Sign in to follow this  
Followers 0
Rufio

timer not working

3 posts in this topic

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

Share this post


Link to post
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.

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  
Followers 0