• 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: delay doesn't work when applet is not frontmost
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delay doesn't work when applet is not frontmost


  • Subject: Re: delay doesn't work when applet is not frontmost
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 06 Mar 2015 09:41:04 +1100

On 6 Mar 2015, at 4:43 am, Stockly, Ed <email@hidden> wrote:
>
> I'm wondering why not just
>
> on delay delayTime
>
>  set sleepScript to "sleep " & delayTime as text
>  do shell script sleepScript
> end delay
>
> Seems to work, does sleep interfere with other processes or something?

When you use sleep, your script is on hold until it returns. You will notice that if you you move the mouse much, you will see the spinning cursor. And it won't respond to command-. immediately, if at all. By breaking it into smaller segments, things stay responsive. The delay command, by contrast, does stuff to keep things responsive automatically.

It's often not a big deal -- although it certainly matters more in Xcode projects. But IMO it's preferable not to have the spinning cursor appear. It's not as if it's any great impost.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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: delay doesn't work when applet is not frontmost
      • From: Shane Stanley <email@hidden>
References: 
 >delay doesn't work when applet is not frontmost (From: "Stockly, Ed" <email@hidden>)
 >Re: delay doesn't work when applet is not frontmost (From: Shane Stanley <email@hidden>)
 >Re: delay doesn't work when applet is not frontmost (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: delay doesn't work when applet is not frontmost
  • Next by Date: Re: delay doesn't work when applet is not frontmost--
  • Previous by thread: Re: delay doesn't work when applet is not frontmost
  • Next by thread: Re: delay doesn't work when applet is not frontmost
  • Index(es):
    • Date
    • Thread