pippi Posted November 6, 2006 Posted November 6, 2006 Hello, i am sort of new to AutoIT and programming, so bear with me if i use the wrong words:) I want to call a function every say 500ms. Is there a way to do it? Here is an example au3 of what i mean: #include <GUIConstants.au3> GUICreate("SampleGUI", 240,200,-1,-1,-1,$WS_EX_TOPMOST) GUISetState(@SW_SHOW) While 1 _samplefunc() ; i want this to happen every 500ms $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Sleep(500) WEnd Func _samplefunc() $a = 5 EndFunc If i use sleep() like in the above example, it lags my whole gui, and other stuff i want to do. How can i make it work? Regards, Pippi
/dev/null Posted November 6, 2006 Posted November 6, 2006 I want to call a function every say 500ms. Is there a way to do it?Adlibenable()CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
xcal Posted November 6, 2006 Posted November 6, 2006 You could also do... $start = TimerInit() While 1 If TimerDiff($start) > 500 Then _samplefunc () $start = TimerInit() EndIf $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd How To Ask Questions The Smart Way
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