Re: Don't understand delay action
Re: Don't understand delay action
- Subject: Re: Don't understand delay action
- From: Shane Stanley <email@hidden>
- Date: Wed, 11 Mar 2015 14:43:44 +1100
On 11 Mar 2015, at 2:38 pm, Robert Poland <email@hidden> wrote:
>
> 4. errors.
Ah, I mis-read what you meant.
>
> Here’s the handler I ended up with.
>
> on delay delayTime
> try
> set theRepeat to delayTime * 10 div 1
> repeat theRepeat times
> do shell script "sleep 0.1"
> end repeat
> on error # catch, no parameter, default time - 1 second
> repeat 10 times
> do shell script "sleep 0.1"
> end repeat
> end try
> end delay
According to the dictionary, delay without an argument defaults to a delay of 0, not 1. So you're avoiding the error, but doing something different.
But why delay for 0?
--
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