• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Call idle handler many times - what happens?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Call idle handler many times - what happens?
      • From: Simon Forster <email@hidden>
References: 
 >Call idle handler many times - what happens? (From: Simon Forster <email@hidden>)

  • Prev by Date: Acrobat 6 question ... Reduce File Size...
  • Next by Date: Re: OT: Re: Shit - it's all true
  • Previous by thread: Call idle handler many times - what happens?
  • Next by thread: Re: Call idle handler many times - what happens?
  • Index(es):
    • Date
    • Thread