For years I've been including an Address Book plug-in script with my Now Contact to Address Book converter. If you click on a custom date field in Address Book the plug in will look up that contact in Now Contact and display it.
A new customer just advised me that it doesn't work for him. I haven't looked at it in a long time and wonder if Apple has done something to break plug-ins in recent versions of Address Book.
When it's working properly, if you mouse over a custom date field name, it highlights against a gray background. This doesn't happen for him, maybe indicating that for some reason the plug-in isn't seen, or isn't loaded, or is rejected for some other reason.
Code is below. When I wrote it I didn't have a good understanding of what I was doing and basically copied an example I found somewhere. But it has worked until now.
using terms from application "Address Book"
on action property return "custom date" -- type of field (a field of type custom date) end action property
on action title for p with e -- p is a person, e is value of field name clicked on. ToolTip return "Look up in Now Contact" end action title
on should enable action for p with e return true -- just means the action is doable end should enable action
on perform action for p with e -- what to do when user selects the action? tell application "Address Book"
set the_Note to note of p -- get note of currently selected contact (other stuff)
end tell
tell application "Now Contact.app" activate --make it frontmost (stuff) end tell return true end perform action
end using terms from
|