Smurfin Posted December 28, 2008 Share Posted December 28, 2008 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. Link to comment Share on other sites More sharing options...
FireFox Posted December 28, 2008 Share Posted December 28, 2008 @Smurfin Maybe... $Init = TimerInit() While 1 Sleep(250) If TimerDiff($Init) >= 180000 Then ExitLoop WEnd ;Start your script Cheers, FireFox. Link to comment Share on other sites More sharing options...
Xand3r Posted December 28, 2008 Share Posted December 28, 2008 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 Link to comment Share on other sites More sharing options...
Smurfin Posted December 28, 2008 Author Share Posted December 28, 2008 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. 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