Address Book plug-ins and 'custom date' fields

May 10, '04 10:42:00AM

Contributed by: BobVB

I've learned quite a bit about writing Address Book plugins in Applescript here at MacOSXHints, and thought I'd add a bit that I've learned. Although "custom date" isn't listed in the Address Book Applescript Dictionary and I haven't seen any example scripts using it, it does work so you can write plugins that use any custom date fields you've created.

Also important to know is that the custom date object is the only one that doesn't return the value of the object as a default -- you have to specifically use (value of <object>) to get the date in the field. And by using (label of <object>) you can write scripts that do different things for differently labeled fields. For example, I have one that will show the upcoming numbered Anniversary for one labeled 'Anniversary,' but for any other, will just show how many years and days since that date have passed.

Hope that helps anyone who might be writing their own plugins.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040506235753247