Re: Finder > Tags.. access
Re: Finder > Tags.. access
- Subject: Re: Finder > Tags.. access
- From: Laine Lee <email@hidden>
- Date: Sun, 23 Dec 2018 12:17:59 -0600
- Thread-topic: Finder > Tags.. access
On 12/22/18, 9:25 PM, "AppleScript-Users on behalf of Shane Stanley"
<applescript-users-bounces+llee040=email@hidden on behalf of
email@hidden> wrote:
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
I can’t get this to compile in my SE 2.11 (Mojave 10.14.2) when I add it at the
end of the script you included in your first reply to the question. It chokes
on the colon before “(missing value)” with “expected end of line” error. I
already tried stripping formatting for the copied text. What might cause that?
Laine Lee
_______________________________________________
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