• 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: Speeding Up Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speeding Up Script


  • Subject: Re: Speeding Up Script
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 23 Nov 2000 01:02:18 -0800

On 11/23/00 12:45 AM, "Chris Nebel" <email@hidden> wrote:

> Assuming all the calls are for unique items, you've got to find a faster way
> to
> get your answer. An item's position in its enclosing window (or the desktop,
> in this case) is stored in the file's Finder info. The Finder lets you get
> this, obviously, but so does "info for", which is faster than the Finder,
> especially if you send the event to yourself. Try replacing your script with
> this one:
>
> on run filename
> icon position of (info for file ((path to desktop as string) &
> filename))
> end run


If I may add, if Chris has no objection to using a 3rd-party scripting
addition, Akua Sweets' 'basic info for' is (much) faster again than 'info
for', principally because it doesn't try to get the size of the file, just a
few basic properties including the position. So, with Akua Sweets installed
in Scripting Additions folder:

on run fileName
finder location of (get basic info for alias ((path to desktop as
string) & filename))
end run

--
Paul Berkowitz


References: 
 >Re: Speeding Up Script (From: Chris Nebel <email@hidden>)

  • Prev by Date: Re: Speeding Up Script
  • Next by Date: Re: Limiting Decimal Places in a Floating Variable?
  • Previous by thread: Re: Speeding Up Script
  • Next by thread: Re: 8.6-9.0.4?
  • Index(es):
    • Date
    • Thread