• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie question about timers...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: newbie question about timers...
      • From: "J. Stewart" <email@hidden>
    • Re: newbie question about timers...
      • From: Tim McGaughy <email@hidden>
  • Prev by Date: Re: newbie question about timers...
  • Next by Date: Re: opening PowerPoint presentation without bringing to front?
  • Previous by thread: Re: newbie question about timers...
  • Next by thread: Re: newbie question about timers...
  • Index(es):
    • Date
    • Thread