• 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: Labels and tags ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Labels and tags ?


  • Subject: Re: Labels and tags ?
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Fri, 23 Jan 2015 21:57:15 +0900

Wow ! That's a lot to digest :) 

Only if you don't approve of cut-and-paste.

I don't mind cut and paste, but if I don't understand what's going on then I won't be able to correct errors if something happens. Plus I'm curious.

It's pretty simple to use: you pass a POSIX path to the file, and then a list of tags if you're setting. You get back a list of the tags if you're asking:

set theFile to (choose file)
my setTags:{"new", "improved"} forPath:(POSIX path of theFile)
my returnTagsFor:(POSIX path of theFile)

The syntax you shown earlier seems a bit different from "standard" applescript. It's the first time I actually see AppleScriptObjC in action on something I actually need. Is there a place where that syntax is explained? Or is it standard but somehow advanced applescript ?

As you mention is a reply to Bill Cheeseman, I was considering to use xattr since that's the only answer I could find on the web:

http://apple.stackexchange.com/questions/106109/any-way-to-set-add-tags-on-a-file-with-applescript-under-mavericks

but it did not strike me as elegant.

I hope Apple will add Tag references to the Finder Dictionary soon though.

And also, thank you so much for your wonderful site, it's been helping me a lot with all the trivial scripts that I've been writing recently.

If you mean www.macosxautomation.com, I can't take the credit -- I'm just a freeloading subtenant.

Ok, so thank the landlord for me :)

Jean-Christophe Helary 
 _______________________________________________
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: Labels and tags ?
      • From: Shane Stanley <email@hidden>
References: 
 >Labels and tags ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Labels and tags ? (From: Shane Stanley <email@hidden>)
 >Re: Labels and tags ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: Labels and tags ? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Labels and tags ?
  • Next by Date: Re: Using Log with Smile
  • Previous by thread: Re: Labels and tags ?
  • Next by thread: Re: Labels and tags ?
  • Index(es):
    • Date
    • Thread