Jjames Posted July 30, 2009 Share Posted July 30, 2009 Hey, I have searched these forums and the autoit help but have not been able to find what i need, so hopefully one of you will be able to help me. My ultimate goal with the program is to have 3 functions that run lets say every 15,30,50 secs. (Func 1 being every 15 secs, Func2 ever 30, Func3 every 50) My idea to do this was to have 3 timers that when finished would reset and push the func onto a queue, which the program would be continously watching. Except I can't find any timers other then _Timer_SetTimer which seems to require a GUI which I don't want. Is there another type of timer/clock something of the sort that is able to be run in the background. Link to comment Share on other sites More sharing options...
Hawkwing Posted July 30, 2009 Share Posted July 30, 2009 $timer = 0 While 1 Sleep(1000) $timer += 1 If Mod($timer, 15) = 0 func1() EndIf If Mod($timer, 30) = 0 func2() EndIf If Mod($timer, 50) = 0 func3() EndIf WEnd Func func1() EndFunc Func func2() EndFunc Func func3() EndFunc The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Jjames Posted July 31, 2009 Author Share Posted July 31, 2009 (edited) That's close to what my initial idea was and I might just end up doing that. However, is there some kind of timer feature? Edited July 31, 2009 by Jjames Link to comment Share on other sites More sharing options...
qazwsx Posted July 31, 2009 Share Posted July 31, 2009 See the help file. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 31, 2009 Share Posted July 31, 2009 My idea to do this was to have 3 timers that when finished would reset and push the func onto a queue, which the program would be continously watching. Except I can't find any timers other then _Timer_SetTimer which seems to require a GUI which I don't want. Is there another type of timer/clock something of the sort that is able to be run in the background.Come on now, you are already running hundreds of windows, how can 1 more be of any problem?If you really can't waste a few (kilo?)bytes of ram then upgrade to latest beta and use AdlibRegister(). .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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