Re: Sort Problem
Re: Sort Problem
- Subject: Re: Sort Problem
- From: Axel Luttgens <email@hidden>
- Date: Sun, 23 Aug 2009 14:14:17 +0200
Le 22 août 09 à 23:16, Luther Fuller a écrit :
I have a script (in 10.5.8) that tells the Finder to ...
set fileList to sort (files of someFolder whose name extension is
"pdf") by modification date
It works perfectly. Realizing that I really didn't need the whose
phrase because the files in the folder are always pdf files, I
change the line above to ...
set fileList to sort (files of someFolder) by modification date
Now, I always get the error ...
"Finder got an error: every file of alias \" ... \" doesn’t
understand the sort message."
Does anyone know why I get this error?
Perhaps again one of those needed "get" statements?
According to the dictionary, Finder's sort command expects a list of
Finder objects.
But a single "(files of someFolder)" appears to be interpreted as a
Finder reference.
So, let's explicitly convert the reference into a list of items:
tell application "Finder" to sort (get files of someFolder) by
modification date
Axel
_______________________________________________
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
References: | |
| >Sort Problem (From: Luther Fuller <email@hidden>) |