Jump to content
Sign in to follow this  
Physical

AdlibEnable Question

Recommended Posts

Physical

I am trying to use adlibenable to execute something every 10 seconds so i did

AdlibEnable ("Function", 10000) and i placed this at the very top of my script.

It made me think of something tho when i was deciding where to put it. If i put it inside a function that gets called frequently, for example:

Func TestFunc()
     AdlibEnable ("Function", 10000)
     $X = $X + 1
EndFunc

OR if i put it inside a loop that is constantly repeating:

While 1
     AdlibEnable ("Function", 10000)
     Sleep (100)
WEnd

Will the timer inside AdlibEnable get reset every time that it gets called again, or will it just ignore it since its already been enabled once? Thanks for any help.

Edited by Physical

Share this post


Link to post
Share on other sites
Valuater

no need to ask, just try your code above

While 1
    AdlibEnable("Function1", 10000)
    Sleep(100)
WEnd

Func Function1 ()
    MsgBox(0x0, "Test", "Thsis is a test   ", 2)
EndFunc   ;==>Function1

the Message box never gets called

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Physical

no need to ask, just try your code above

While 1
    AdlibEnable("Function1", 10000)
    Sleep(100)
WEnd

Func Function1 ()
    MsgBox(0x0, "Test", "Thsis is a test   ", 2)
EndFunc   ;==>Function1

the Message box never gets called

8)

I didn' t even think of trying that. Thanks for the help.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.