Giving credit where it's due, this was originally posted on the Apple Discussions forum by b.neely. Address Book now supports plug-ins for the rollover action menus in the card. They can be written in Carbon, Cocoa, or AppleScript. The remainder of the hint has a sample AppleScript plugin. See the steps below the script for installing it on your computer.
[robg adds: This is the first of two hints today containing sample Address Book plug-ins created using AppleScript. This extensibility could be very useful...]
2005 Update: Please see the comment by magnamous below for an updated script that works in 2005 (as the company website has changed).
--burger time!
using terms from application "Address Book"
on action property
return "address"
end action property
on action title for p with e
if zip of e is missing value then
return "In-n-Out Burger locator (zipcode required)"
else
return "In-n-Out Burger locator for zipcode " & zip of e
end if
end action title
on should enable action for p with e
if zip of e is missing value then
return false
else
return true
end if
end should enable action
on perform action for p with e
set burgerURL to ¬
"http://www.in-n-out.com/cgi-bin/zipsearch.pl?zipcode=" & zip of e
tell application "Safari"
set browser to make new document
tell browser
set URL to burgerURL
end tell
end tell
return true
end perform action
end using terms from
To install on your computer:Mac OS X Hints
http://hints.macworld.com/article.php?story=20031106193307666