Address Book Help
Index

# Installing AppleScript plug-ins

Address Book supports AppleScript plug-ins that let you add actions to the field-label pop-up menus in address cards.

## To install an AppleScript plug-in:

Put the plug-in file in the /Library/Address Book Plug-Ins/ folder in your home folder or in the /Library/Address Book Plug-Ins/ folder in the root directory.

The following example is an AppleScript plug-in that Address Book uses to calculate a contact's age when you click the "birthday" label on the address card:

using terms from application "Address Book" on action property return "birth date" end action property

on action title for p with e return (((year of (current date)) - (year of e)) as string) & " years old" end action title

on should enable action for p with e return true end should enable action

on perform action for p with e display dialog (name of p & " is " & ((year of (current date)) - (year of e)) as string) & " years old" return true end perform action end using terms from

## See also

automating tasks