![]() Email address (Required) Secondary email address. Type in ~/Library/ in the box and your home folder Library folder will open up for you.Contact telephone details (Required) Secondary contact phone details. If your on (OSX 10.7.x) Lion and can't find your Library folder because it's hidden by default go to the Finder -> Go -> Go to Folder. Save the script using these settings: Save As: ZipCodeLocator, Where: ~/Library -> Address Book Plug-Ins/ File Format: Script Options: Run only Paste the script into the top of a new script window Open /Applications -> AppleScript -> Script Editor.app ![]() It would be nice for it to just go fetch the Zip+4 and amend it automatically to the address book entry that the query came from instead of having to click edit, and type in the newly looked up zip+4 then click done.Įither way, beggars can't be choosers and thanks for getting this script updated so quickly.īy the way, here is how to install the script instead of having people go find the original post.:Ĭopy the script above, between the dotted lines zip code locatorusing terms from application "Address Book" on action property return "address" end action property on action title for p with e if zip of e contains "-" 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 does not contain "-" then return true else return false end if end should enable action on perform action for p with e set LookupURL to ¬ "!input.action?resultMode=0&companyName=&address1=" & street of e & "&address2=&city=" & ¬ city of e & "&state=" & state of e & "&urbanCode=&postalCode=&zip=" tell application "Google Chrome" if not (exists first window) then make new window set URL of last tab of first window to LookupURL else tell first window set newTab to make new tab with properties end tell end if activate end tell return true end perform actionend using terms fromĪwesome! I just updated this and it works great once again. zip code locatorusing terms from application "Address Book" on action property return "address" end action property on action title for p with e if zip of e contains "-" 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 does not contain "-" then return true else return false end if end should enable action on perform action for p with e set LookupURL to ¬ "!input.action?resultMode=0&companyName=&address1=" & street of e & "&address2=&city=" & ¬ city of e & "&state=" & state of e & "&urbanCode=&postalCode=&zip=" tell application "Safari" to open location LookupURL return true end perform actionend using terms from Two versions: one to open with Safari and the second to open with Chrome. Once again the USPS changed their website code, so here is the script again (building upon the previous hints) with the updated URL. Also updated to open Safari directly and to allow for lookup if 5-digit Zip already there (from previous hints thanks!) - zip code locatorusing terms from application "Address Book" on action property return "address" end action property on action title for p with e if zip of e contains "-" 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 does not contain "-" then return true else return false end if end should enable action on perform action for p with e set LookupURL to ¬ "" & street of e & "&address1=&city=" & ¬ city of e & "&state=" & state of e & "&urbanization=&zip5=&submit.x=6&submit.y=15" tell application "Safari" to open location LookupURL return true end perform actionend using terms from-Joe Here is the script again with the updated URL. ![]() ![]() Here's the modified version: - zip code locatorusing 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 ¬ "" ¬ & street of e & "&city=" & city of e & "&state=" & state of e tell application "Dock" to open location LookupURL return true end perform actionend using terms fromYou can also find the original, along with some discussion, here on my site.Īs previously mentioned, the USPS changed their website code. I modified the Burger Locator script for Address Book to look up zip codes from the U.S. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |