• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder > Tags.. access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder > Tags.. access


  • Subject: Re: Finder > Tags.. access
  • From: Jim Underwood <email@hidden>
  • Date: Sun, 23 Dec 2018 20:20:03 +0000
  • Thread-topic: Finder > Tags.. access

Shane,

Thanks for sharing this script.  Looks useful.

I also am getting a compile error:
Expected end of line, etc. but found “:”.

On this line:
set {theDict, theError} to current application'sNSPropertyListSerialization's
propertyListWithData:theDataoptions:0 format:(missing value) |error|:(reference)



Best Regards,


Jim Underwood

aka JMichaelTX


From: AppleScript-Users
<applescript-users-bounces+jmichael=email@hidden<mailto:applescript-users-bounces+jmichael=email@hidden>>
 on behalf of Shane Stanley
<email@hidden<mailto:email@hidden>>
Date: Saturday, December 22, 2018 at 9:21 PM
To: "ASUL (AppleScript)"
<email@hidden<mailto:email@hidden>>
Subject: Re: Finder > Tags.. access

On 23 Dec 2018, at 2:15 pm, Jean-Christophe Helary
<email@hidden<mailto: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 pathof (path tolibrary folder from user domain) &
"SyncedPreferences/com.apple.finder.plist"
settheDatato current application'sNSData'sdataWithContentsOfFile:thePath
set {theDict, theError} to current application'sNSPropertyListSerialization's
propertyListWithData:theDataoptions:0 format:(missing value) |error|:(reference)
if theDict is missing valuethen error theError's localizedDescription() as text
set theTags to
theDict'svalueForKeyPath:"values.FinderTagDict.value.FinderTags.n"
end fetchAvailableTags


Then change:

set availableTagsto current application'sNSWorkspace's sharedWorkspace()'s
fileLabels()

to:

set availableTagsto my fetchAvailableTags()

--
Shane Stanley <email@hidden<mailto:email@hidden>>
<www.macosxautomation.com/applescript/apps/<http://www.macosxautomation.com/applescript/apps/>>,
 <latenightsw.com<http://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

References: 
 >Finder > Tags.. access (From: Jean-Christophe Helary <email@hidden>)
 >Re: Finder > Tags.. access (From: Shane Stanley <email@hidden>)
 >Re: Finder > Tags.. access (From: Jean-Christophe Helary <email@hidden>)
 >Re: Finder > Tags.. access (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Finder > Tags.. access
  • Next by Date: Re: Finder > Tags.. access
  • Previous by thread: Re: Finder > Tags.. access
  • Next by thread: Re: Finder > Tags.. access
  • Index(es):
    • Date
    • Thread