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 think you'll want to run your check periodically rather than
continuously. That way your app gets some breathing room for UI
keystrokes and clicks. In AppleScript, the normal way to do this is
in an idle handler.