Re: Finder > Tags.. access
Re: Finder > Tags.. access
- Subject: Re: Finder > Tags.. access
- From: Shane Stanley <email@hidden>
- Date: Sun, 23 Dec 2018 14:21:12 +1100
On 23 Dec 2018, at 2:15 pm, Jean-Christophe Helary <email@hidden> wrote:
>
> For some reason the script does not give me the full list.
There's no official way to get the full list, but this *may* get what you want:
on fetchAvailableTags()
set thePath to POSIX path of (path to library folder from user domain)
& "SyncedPreferences/com.apple.finder.plist"
set theData to current application's NSData's
dataWithContentsOfFile:thePath
set {theDict, theError} to current application's
NSPropertyListSerialization's propertyListWithData:theData options:0
format:(missing value) |error|:(reference)
if theDict is missing value then error theError's
localizedDescription() as text
set theTags to theDict's
valueForKeyPath:"values.FinderTagDict.value.FinderTags.n"
end fetchAvailableTags
Then change:
set availableTags to current application's NSWorkspace's sharedWorkspace()'s
fileLabels()
to:
set availableTags to my fetchAvailableTags()
> Also, the dialog does not allow me to remove a tag.
Sure it does -- command-click to deselect.
> By the way, does assigning a shortcut to Tags... in System Preferences work
> on your side ?
Yes. Make sure you enter an ellipsis, not three stops.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden