Re: Poking an Idle Handler
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