Re: Call idle handler many times - what happens?
Re: Call idle handler many times - what happens?
- Subject: Re: Call idle handler many times - what happens?
- From: Brian Johnson <email@hidden>
- Date: Wed, 8 Jun 2005 08:57:43 -0700 (PDT)
On Wed, 8 Jun 2005, Simon Forster wrote:
I have a stay open script with an idle handler which returns 60. i.e. It will
be run again in circa 60 seconds. The idle handler is initially called by the
run handler.
The run handler will be called many times and will, in turn, call the idle
handler many times. What happens in this situation?
Hi Simon!
There isn't really a need for the run handler to call the idle handler.
Idle events are generated by the system. If you want to control how long
you wait between them, or respond to being idle (e.g., by quitting), you
write an idle handler. Calling the idle hander does not make your script
idle.
So, if you have a script that is run by a folder action (for example), but
wants to do some house-keeping inbetween folder action events, just do
separate run and idle handlers.
btw, when a script launches, there is no good way to predict when the
first idle event will occur. It can even happen BEFORE the run event.
- brian johnson, dept of architecture, university of washington, seattle
http://brj.caup.washington.edu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden