using terms from application "Address Book" on action property return "phone" end action property on action title for aPerson with aPhone return "Look Up Address from Phone Number" end action title on should enable action for aPerson with aPhone return true end should enable action on perform action for aPerson with aPhone set thephone to ((value of aPhone) as string) set AppleScript's text item delimiters to {"(", ")", " ", "-"} set qpa to thephone tell application "Safari" activate open location ("http://findaperson.canada411.ca/search/Reverse_Phone?phone=" & qpa) end tell end perform action end using terms from