> Message: 4
> Date: Wed, 21 Jun 2006 10:25:04 -0400
> From: email@hidden
> Subject: Managing a queue...
> To: email@hidden
> Message-ID:
> <email@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> I have an applescript that checks a folder for any files that need
> processing---with an endless repeat loop.
>
> Now I'm trying to add a checkbox to the interface for turning it on and
> off. Without having to quit.
>
> So I modified the repeat loop to check for the boolean value of the
> checkbox every time it starts over. If the checkbox is true then the
> script would just continue. If it was false the script would exit the
> repeat.
>
> Now I'm realizing that once I run the script, I can't un-check the
> checkbox. I'm locked out of the interface completely.
>
> Anyone have any ideas about how I might get around this?
I second Philip's recommendation to use an "on idle" handler. And put a
"return N" line at the end of the handler code, where N is the number of
seconds before the next return to the handler. That way, you can control
how often the script enters the idle handler and then checks the folder.
You might want to check every 5 seconds, or every 10 seconds, for instance.
I believe the default is 30 seconds. If timeliness is not of the essence,
then maybe you could go even longer.
Craig
--
Dr. Craig Hunter
NASA Langley Research Center
Configuration Aerodynamics Branch
email@hidden
(757) 864-3020
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden
This email sent to email@hidden