Re: Labels and tags ?
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:
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