• 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
Finder sorting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finder sorting


  • Subject: Finder sorting
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 8 May 2005 19:29:28 -0700

The dictionary for Tiger's Finder includes the following:

sort v : Return the specified object(s) in a sorted list
sort reference : a list of finder objects to sort
by property : the property to sort the items by (name, index, date, etc.)
→ reference : the sorted items in their new order


Note that it does not say "Not available."

The following two scripts fail, with a "doesn't understand the sort message" error:

tell application "Finder"
    sort disk "Dora" by modification date
end tell

tell application "Finder"
    sort items of disk "Dora" by modification date
end tell

But this one does work:

tell application "Finder"
    sort ((items of disk "Dora") as alias list) by modification date
end tell

As the dictionary says, it returns a list; interestingly, it's a list of Finder objects, not an alias list.

This also works:

tell application "Finder"
set (arrangement of icon view options of window of disk "Dora") to arranged by modification date
end tell



-- Michelle

--
"Beware the march of ideas."

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Non-character keystrokes (Digest, Vol 2, Issue 301 #11)
  • Next by Date: Re: Nice Automator article on O'Reilly
  • Previous by thread: Re: Non-character keystrokes (Digest, Vol 2, Issue 301 #11)
  • Next by thread: Startup script not working
  • Index(es):
    • Date
    • Thread