Jump to content
Sign in to follow this  
rajeshontheweb

AdlibEnable

Recommended Posts

rajeshontheweb

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 .

Share this post


Link to post
Share on other sites
KaFu

"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.

Share this post


Link to post
Share on other sites
rajeshontheweb
KaFu

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.

Share this post


Link to post
Share on other sites
isolation

you should set the tray items "onevent"

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  

×