Re: items selected
Re: items selected
- Subject: Re: items selected
- From: Dave Lyons <email@hidden>
- Date: Mon, 24 Oct 2005 16:35:23 -0700
On Oct 23, 2005, at 12:21 PM, Robert Poland wrote:
...
tell application "Finder" to set label index of every file of
folder1 to myLabelIndex
tell application "Finder" to set label index of every folder of
folder1 to myLabelIndex
It would probably be better to just ask for "every item" -- "item" is
the Finder class that includes both files and folders:
tell application "Finder" to set label index of every item of
folder1 to myLabelIndex
One other interesting thing: A "normal" Finder window showing the
contents of a disk or folder has class "Finder window", which is a
kind of "window". Getting the selection will work even if there is
some other sort of Finder window open in front of the frontmost
"Finder window". (The other window could be Preferences, Get Info,
View Options, Clipboard, etc.)
Since you script uses "window 1" in the empty-selection case, it may
try to get every item of an arbitrary kind of Finder window (which,
perhaps strangely, doesn't complain...it just returns an empty list).
It would make the selection and no-selection cases more consistent to
use "Finder window 1" in place of "window 1".
Cheers,
--Dave
_______________________________________________
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