Re: newbie question about timers...
Re: newbie question about timers...
- Subject: Re: newbie question about timers...
- From: email@hidden
- Date: Mon, 9 Mar 2009 15:11:05 -0400
>From: "J. Stewart" <email@hidden>
>Subject: Re: newbie question about timers...
>
>On 3/9/09 at 2:29 AM, Tim McGaughy <email@hidden> spake thusly:
>
>>I am in the middle of writing a script that will check an
>>object in an application for changes. I don't want to badger
>>the application for this information constantly, though, just
>>once in a while, perhaps every 5 minutes.
>>
>>What ways are available to make a script pause for a length of time before continuing on?
>
>There are a couple of ways depending on what you are trying to
>accomplish. Given your stated reason, best method is probably a
>"stay open" script with an "on idle" handler.
>
>Go here (<http://tinyurl.com/cy9ple>) for the pertinent ASLG section.
That really is the preferred way (an idle handler) but for quick and dirty pauses I just stick in a perl command:
set SECONDS_TO_PAUSE to 30
...
do shell script "perl -e 'sleep " & SECONDS_TO_PAUSE & ";'"
- Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden