Re: tell a script to tend to system process for X amount of time?
Re: tell a script to tend to system process for X amount of time?
- Subject: Re: tell a script to tend to system process for X amount of time?
- From: Neil Faiman <email@hidden>
- Date: Thu, 17 Mar 2005 07:20:24 -0500
On Mar 17, 2005, at 5:49 AM, Patrick Collins wrote:
ok as of now, I have done what you suggested.. I want two different
pauses-- so I couldnt have an idle handler do both...... So I had to
put one sleep event in there.. Is there another way I should handle
this?
-patrick
The strategy is really perfectly flexible -- you just need to remember
your context from one execution of the idle handler to the next, which
you accomplish with global variables.
property state : 0
on idle
if state = 0 then
do state1 actions
set state to 2
return (idle time 1)
else if state = 2 then
do state2 actions
set state to 3
return (idle time 2)
else if state = 3 then
do state 3 actions
set state to 1
return (idle time 3)
end if
end idle
-Neil Faiman
_______________________________________________
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