Setting labels of Finder items in Panther? You can, but...
Setting labels of Finder items in Panther? You can, but...
- Subject: Setting labels of Finder items in Panther? You can, but...
- From: Charles Arthur <email@hidden>
- Date: Tue, 28 Oct 2003 16:14:27 +0000
Apologies if this has already been asked and answered (I did a search on my
a-u list archive but didn't find it).
In OS9, the following worked once you'd chosen a file:
tell application "Finder" to set label index of selection to 2
--which would set the label to red, the usual default for label index 2.
In Panther however it yields
"Finder got an error: Can't set label index of selection to 2."
But this script
tell application "Finder"
set theselection to selection
set label index of item 1 of theselection to 2
end tell
--works fine
--because theselection comes up as a list,eg {document file
"definitions-flapper" of folder "Desktop" of folder "charles" of folder
"Users" of startup disk}. (But then surely it was a list in OS9 too?)
However
tell application "Finder" to set label index of item 1 of selection to 2
--fails as above.
So I've got a workaround, but it would be nice to understand why one
version works and the other doesn't.
Charles
--
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.