Jump to content

AdlibEnable


Recommended Posts

Guys, it might look too primitive a question for those experienced developers out there. but i am rather confused about this AdlibEnable Stuff.

What is it?

Googling didnt give me enough explanation

i saw in a couple of simple scripts it gives me a feeling it might create a sort of multi threading or background function calling ability is it so?

pls explain

i have been into amateur programming since a while and i know nothing about this concept if it is a universal concept like OOPS or something .

Link to comment
Share on other sites

"Every 250 ms (or time ms) the specified "function" is called--typically to check for unforeseen errors. For example, you could use adlib in a script which causes an error window to pop up unpredictably.

The adlib function should be kept simple as it is executed often and during this time the main script is paused. Also, the time parameter should be used carefully to avoid CPU load.

"

So what it does is pause your script execution and call the defined function. If that function is long or contains (infinite) loops, this will impair the script performance respectively. If you keep the function short, fast and simple it might seem to the end-user like a kind of multithreading, but it isn't because the main script pauses meanwhile.

Link to comment
Share on other sites

Link to comment
Share on other sites

so simple terms, i could typicallyuse this to update my progress bar or something???

Yep, exactly.

Can i have the system tray events checked in here? just for exit or some thing.

Guess that should work to. But keep in mind that that every ms in the adlib function is subtracted from your main prog runtime, meaning fast repeated calls with a long runtime will significantly reduce your main scripts responsiveness / performance. For such checks I prefer the guionevent mode.

Link to comment
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
 Share

  • Recently Browsing   0 members

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