Jump to content

Recommended Posts

Posted (edited)

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
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...