Re: is delay broken in JSA
Re: is delay broken in JSA
- Subject: Re: is delay broken in JSA
- From: Deivy Petrescu <email@hidden>
- Date: Mon, 15 Dec 2014 19:33:09 -0500
May be it is not delay that it is broken.
Save the following script (in JSA) as an application;
app=Application.currentApplication()
app.includeStandardAdditions = true
data=$.NSDate.date
Progress.totalUnitCount = 10
for (i=1; i<10; i++){
Progress.description = 'Processing '+(i)+' out of 10'
delay(1)
Progress.completedUnitCount = i+1
}
data1=$.NSDate.date
ddata= $(data1).js.getTime()-$(data).js.getTime()
ddata=ddata/1000
app.strictParameterType = false
app.displayDialog(ddata)
> On Dec 15, 2014, at 18:33 , Shane Stanley <email@hidden> wrote:
>
> On 16 Dec 2014, at 10:29 am, Deivy Petrescu <email@hidden> wrote:
>>
>> What is broken in delay ?
>
> Save this as an applet, and run it:
>
> set time1 to current date
> set progress total steps to 10
> repeat with i from 1 to 10
> set progress description to "Processing " & i & " of " & 10
> delay 3
> set progress completed steps to i
> end repeat
> display dialog ((current date) - time1) as text
>
> Let it run for a few seconds, then just move your mouse.
>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>
Deivy Petrescu
email@hidden
_______________________________________________
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