• 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: Why is it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is it


  • Subject: Re: Why is it
  • From: deivy petrescu <email@hidden>
  • Date: Sat, 9 Feb 2008 17:02:15 -0500


On Jan 30, 2008, at 6:00, Nigel Garvey wrote:

Michelle Steiner wrote on Tue, 29 Jan 2008 14:00:42 -0700:

This script takes four seconds to complete:

tell application "Finder"
	set foo to entire contents of (path to documents folder)
end tell

This script runs almost instantaneously:

tell application "Finder"
set foo to entire contents of (path to documents folder) as alias list
end tell

As an aside, 'as Unicode text' (Jaguar to Tiger) is even faster:

 set astid to AppleScript's text item delimiters
 set AppleScript's text item delimiters to (ASCII character 0) as
Unicode text
 tell application "Finder"
   set foo to text items of (entire contents of (path to documents
folder) as Unicode text)
 end tell
 set AppleScript's text item delimiters to astid
 items 1 thru 10 of foo


NG

Leave it to Nigel if we want a script optimized! Nigel, I forgot to thank you earlier. This is a great piece of code.

Deivy
_______________________________________________
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
  • Prev by Date: Re: PHP and Applescript
  • Next by Date: Re: A date IS a date
  • Previous by thread: Re: AppleScript-Users Digest, Vol 5, Issue 93
  • Next by thread: Setting properties in Address Book
  • Index(es):
    • Date
    • Thread