Jump to content

Recommended Posts

Posted

can anyone please teach me how to make a timer inside a main program loop, so the timer will only execute a certain function after like 30 minutes and the loops goes on without executing this one function again, only after the next 30 minutes it will be executed again.

thanks in advance.

Posted

@Smurfin

Maybe...

$Init = TimerInit()

While 1
    Sleep(250)
    If TimerDiff($Init) >= 180000 Then ExitLoop
WEnd

;Start your script

Cheers, FireFox.

Posted

you could use adlibenable or

$timer=TimerInit()

$time=30*60*1000
While 1
    ToolTip(Round(TimerDiff($timer)/1000,2),0,0)
    If TimerDiff($timer)>$time Then
        $timer=TimerInit()
        MsgBox(0 , "" , "test msgbox")
    EndIf
    Sleep(10)
WEnd

now you just have to decide where to put the second timerinit

just after the if or just before the endif:P

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Posted

thanks everyone, I'll try to figure out how to fit these scripts to use with my existing scripts. I'll post again later if I got stuck.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...