-- zip code locator
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 not missing value then
return "Zip Code Present"
else
return "ZIP + 4 Lookup "
end if
end action title
on should enable action for p with e
if zip of e is missing value then
return true
else
return false
end if
end should enable action
on perform action for p with e
set LookupURL to ¬
"http://zip4.usps.com/zip4/zip4_responseA.jsp?Selection=1&address1=" ¬
& street of e & "&city=" & city of e & "&state=" & state of e
tell application "Dock" to open location LookupURL
return true
end perform action
end using terms from
You can also find the original, along with some discussion, here on my site.
[robg adds: Refer to the linked original hint for instructions on how to add this script to Address Book.]

