using terms from application "Address Book" on action property return "address" end action property on action title for aPerson with aaddress return "Look Up Company Phone Number" end action title on should enable action for aPerson with aaddress return true end should enable action on perform action for aPerson with aaddress set cit to city of address of aPerson set org to organization of aPerson set AppleScript's text item delimiters to "" tell application "Safari" activate open location ("http://canada411.yellowpages.ca/searchBusiness.do?what=" & org & "&srchtype=business&city=" & cit & "&sType=simpleSearch&action=homeSearch&step=getDirectory&Se=smp") end tell end perform action end using terms from