Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zeppenwolf

macrumors regular
Original poster
Nov 17, 2009
129
3
Is there [subject line] ?

By "Finder labels" I mean the 7 colors you can attach to a Finder object, the names of which you can adjust through Finder menu "Preferences..."

I can't find any programmatic access, ( I mean, a NS or CF call, not AS ) to these on X.6.8 ( sorry, can't remember which damn cat this is), although I have *some* AS access.

In Applescript I can get/set the "label number [n]" for a Finder item, but I can't get or set the name of it. In the AS Editor's Open... Finder Dictionary, I get this:

label n : (NOT AVAILABLE YET) [!!!] A Finder label (name and color)

PS: On my MBP, the labels are colored from top to bottom like this:

Red
Orange
Yellow
Green
Blue
Purple
Grey

Yet, the "number" of the label, according to AS, goes like this:

0 <no label>
2 Red
1 Orange
3 Yellow
6 Green
4 Blue
5 Purple
7 Grey
 
If you make a smart search that operates on the label, save the search, and Get Info on the smart search, you'll see "kMDItemFSLabel" as part of the query.

There's a lot of info out there if you Google kMDItemFSLabel. Some of it might be useful. I didn't have time to dig into all the suggestions.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.