Jun 07, '07 07:30:02AM • Contributed by: Anonymous
tell application "Finder"
set thisItem to selection as alias
if label index of thisItem = 0 then
set the label index of thisItem to 2 -- 2 = red
else
set label index of thisItem to 0 -- 0 = no label
end if
end tell
I then set it to run with the arbitrary key-combination of Option-Command-Control-L. This code will toggle on and off the Red label only. However, using Butler and modifying the AppleScript, one could set a combo to toggle all the different labels on and off -- perhaps using one to six on your keyboard, with appropriate modifier keys.
