Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is it



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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.