This plug-in will set the Finder label of a file.
Download this zip file and drop it on Keyboard Maestro to install the Plug In Action:
SetFinderLabel.zip (7.9 KB)
This plug-in will set the Finder label of a file.
Download this zip file and drop it on Keyboard Maestro to install the Plug In Action:
SetFinderLabel.zip (7.9 KB)
A classic osx irritation for scripting - this really helps! Was scratching my head about plugins in KM, but this example helps me understand.
At that time when label-band became multi-label/tag-dots, we lost the old label-set system. But is there a way to return the value of the current Finder Label/Tag (first, or multiple array, i guess) into a variable like finder_tag_colour ??
Such a converse plugin also interesting to me.
The Get File Attribute action can get tags, and the Set File Attribute action can set, add, remove, or toggle tags.
The label you can get via AppleScript:
tell application "Finder"
get label index of alias "<HFS file path>"
end tell
Peter, yet another treasure chest of functionality - I had no idea those were there. So then a question, and a remark:
tags (remove) nukes all tags or do you need to explicitly specify?
Iâve defected from Finder to Path Finder; I just noticed (THANK YOU!) that in PF the colour tags are available as attributes/selectable menu items. Thereâs also a menu item for âcopy path/HFSâ for highlighted, so it appears I can use KM to add various additional functionality to PF. Amazing.
Thank you, Tom. Do we expect to be able to âtell application âPath Finderââ the same thing?
I have no idea. But, since Finder is running all the time, it doesnât harm to ask the Finder for the label information. (It will not bring the Finder to the foreground, or something like that.)
PS: You can look it up in Path Finderâs AppleScript dictionary:
Open Script Editor, File > Open DictionaryâŚ, double-click Path Finder in the list.
In the dictionary window, make sure âAppleScriptâ is set as language. Type âlabelâ into the search field.
In all cases, you canât have duplicate tags, so adding a tag a second time has no effect.
Some days ago, but thanks for this Tom.
Thanks for this Peter.