Last active
December 3, 2024 11:01
-
-
Save Zettt/5143159 to your computer and use it in GitHub Desktop.
Set Color Label for selected Finder items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
No color = 0 | |
Orange = 1 | |
Red = 2 | |
Yellow = 3 | |
Blue = 4 | |
Purple = 5 | |
Green = 6 | |
Gray = 7 | |
*) | |
set mycolor to 7 | |
tell application "Finder" | |
try | |
repeat with currentFile in items of (get selection) | |
if label index of currentFile is not mycolor then | |
set label index of currentFile to mycolor | |
else | |
set label index of currentFile to 0 | |
end if | |
end repeat | |
on error e | |
return e | |
end try | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment