Re: Why is it
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