• 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: Poking an Idle Handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Poking an Idle Handler


  • Subject: Re: Poking an Idle Handler
  • From: Brian Johnson <email@hidden>
  • Date: Tue, 14 Sep 2004 08:53:19 -0700 (PDT)


On Tue, 14 Sep 2004, Mr Tea wrote:

A stay-open applet containing an idle handler is running, and it's in the
middle of a 15-minute idle period. I'd like to cut to the end of that idle
period and move the script on to whatever it was going to do next.

Is there a way?

I'll answer my own question. Yes. There is a way...

   tell application "Tea Timer"
    tell (idle)
     return
    end tell
   end tell

or (assuming that Tea Timer has a "run" handler and that's what you want it to move on to)


     tell application "Tea Timer" to run

(Your idle handler determines what happens when an "idle" event is sent to your script. When your idle hander returns 60 (or whatever) it sets a wake-up entry in the system idle-events table (or whatever it's called), so the idle-hander isn't really 'running' it's just determining what to do when there's nothing to do. If you come along with something to do (tell application "Tea Timer"...), that event/handler jumps the queue and stuff happens. This is the fundamental event structure behind applescript ACGI scripts -- a stay-open app with an "on acgi event" handler and an idle handler.)

Hope that helps.

  Brian Johnson, Dept of Architecture, University of Washington, Seattle
_______________________________________________
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: Poking an Idle Handler
      • From: Mr Tea <email@hidden>
References: 
 >Re: Poking an Idle Handler (From: Mr Tea <email@hidden>)

  • Prev by Date: IS: Script Editor Styles Format Change Script -- WAS: Re: String to list conversion
  • Next by Date: Re: Selected text in Mail.app?
  • Previous by thread: Re: Poking an Idle Handler
  • Next by thread: Re: Poking an Idle Handler
  • Index(es):
    • Date
    • Thread