Sign in to follow this  
Followers 0
pippi

Timed events?

4 posts in this topic

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

Share this post


Link to post
Share on other sites



I want to call a function every say 500ms. Is there a way to do it?

Adlibenable()

Cheers

Kurt


__________________________________________________________(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 *

Share this post


Link to post
Share on other sites

Thanks for the fast reply!

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