Finder sorting
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