Re: Overhead in Using Run Script in a Loop ???
Re: Overhead in Using Run Script in a Loop ???
- Subject: Re: Overhead in Using Run Script in a Loop ???
- From: KOENIG Yvan <email@hidden>
- Date: Sat, 03 Mar 2012 16:31:03 +0100
Le 3 mars 2012 à 12:59, Shane Stanley a écrit :
> On 03/03/2012, at 10:46 PM, KOENIG Yvan wrote:
>
>> I wish to add that in such case, the script issue an error (which is automatically filtered).
>
> Right. And the error number is recognised as signifying that the command should be resent, this time skipping the application from the tell block.
I have an unanswered question.
What is the more efficient ?
Case #1
tell application "Finder"
-- some tasks
end tell
-- call to Standard Addition
tell application "Finder"
-- some other tasks
end tell
Case #2
tell application "Finder"
-- some tasks
my handler()
-- some other tasks
end tell
on handler()
-- call to Standard Addition
end handler
As far as I know, the instruction tell application "wxyk" is time consuming so
I assume that case #2 is the best
but I have no idea about the overhead added by the call to a handler.
Most of the times, I use case #2.
Yvan KOENIG (VALLAURIS, France) samedi 3 mars 2012 14:23:22
_______________________________________________
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