• 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: 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

  • Follow-Ups:
    • Re: Finder > Tags.. access
      • From: Jean-Christophe Helary <email@hidden>
    • Re: Finder > Tags.. access
      • From: Jim Underwood <email@hidden>
    • Re: Finder > Tags.. access
      • From: Laine Lee <email@hidden>
    • Re: Finder > Tags.. access
      • From: Jean-Christophe Helary <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>)

  • 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