• 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: Overhead in Using Run Script in a Loop ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Overhead in Using Run Script in a Loop ???
      • From: Shane Stanley <email@hidden>
References: 
 >Overhead in Using Run Script in a Loop ??? (From: Rick Gordon <email@hidden>)
 >Re: Overhead in Using Run Script in a Loop ??? (From: Shane Stanley <email@hidden>)
 >Re: Overhead in Using Run Script in a Loop ??? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Overhead in Using Run Script in a Loop ???
  • Next by Date: Web Beacons
  • Previous by thread: Re: Overhead in Using Run Script in a Loop ???
  • Next by thread: Re: Overhead in Using Run Script in a Loop ???
  • Index(es):
    • Date
    • Thread