Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Set Finder color labels via Butler and AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set Finder color labels via Butler and AppleScript
Authored by: JMacMan on Jun 10, '07 09:26:30PM
There's a similar Applescript from a post at http://forums.macosxhints.com/showthread.php?t=57823. I modified it a bit to prompt for a color on run, but otherwise, this idea works great with Quicksilver. i've been using it for some time now (though I never knew about the built in feature, thanks for pointing that out procton).

[ Reply to This | # ]
Set Finder color labels via Butler and AppleScript
Authored by: bonobo on Jun 11, '07 03:38:57AM

Would you please be so kind to post your modified script? I'd be very glad to have such a choice.

TIA, Tom



[ Reply to This | # ]
Set Finder color labels via Butler and AppleScript
Authored by: JMacMan on Jun 11, '07 09:17:13AM

property defaultColor : "Red"

-- No color = 0
-- Orange = 1
-- Red = 2
-- Yellow = 3
-- Blue = 4
-- Purple = 5
-- Green = 6
-- Gray = 7
set theColors to {"No color", "Orange", "Red", "Yellow", "Blue", "Purple", "Green", "Gray"}

set userColor to choose from list theColors with title "Which color?" with prompt "Please select a color for the selected Finder items:" default items {defaultColor}
repeat with n from 1 to (count theColors)
	if ((item n of theColors) as string) is equal to (userColor as string) then
		set file_color to n - 1
	end if
end repeat

tell application "Finder"
	activate
	set selected to selection
	repeat with n_file in every item in selected
		set label index of n_file to file_color
	end repeat
end tell
would be nice to have colors for each entry rather than just text but I don't think theres any way to do this with Applescript

[ Reply to This | # ]
Set Finder color labels via Butler and AppleScript
Authored by: bonobo on Sep 21, '07 04:44:54PM

Thank you :-)



[ Reply to This | # ]