mobile version
MethodShop.com LLC

rssnews,
reviews and
how to's

methodshop
 
facebook
itunes
flickr
myspace
amazon
apple
technorati
twitter
  home | gadgets | games | music | video | picts | reviews | tutorials | about SocialTwist Tell-a-Friend
  corner



iTunes



methodshop MAILING LIST
Email:

2/13/2005

Add Google Maps to Mac OS X Address Book



Just when you thought Google couldn't get any better, they launched an amazing online mapping service this week. Also newsworthy, MapQuest crapped their pants.

If you have yet to play with Google Maps, don't waste time and go check it out. The service is still in beta, so expect a few glitches and make sure you download the FireFox web browser first (even Google thinks Internet Explorer sucks!). Also please note that Google Maps currently only supports U.S. addresses.

After checking it out, I'm sure you will agree that Google Maps isn't only a great mapping tool, but it's fun to navigate and has great graphics. You will probably want to bookmark it and make it part of your normal routine. Savvy Mac OS X users may even want to integrate it into their Address Book.

Here's how:
  1. Launch up Script Editor (Applications > AppleScript > Script Editor)
  2. Select New from the File menu to create a new empty script
  3. Copy the code listed below in-between the "--Start" and "--End" comments
  4. Paste this code into the blank empty script in Script Editor
  5. Save the script in your ~/Library/Address Book Plug-Ins/ directory and name it "Google Map Of.scpt"
  6. If the Address Book application is open, quit it
  7. Launch Address Book and select someone with a U.S. address
  8. Right-click or control-click on an address and select 'Google Map Of (Firefox)' from the pop-up menu
  9. FireFox should open up with a map
  10. Enjoy

AppleScript Code from MacOSXHints.com:

-- Start
property googleMaps : "http://maps.google.com/maps?q="

using terms from application "Address Book"

on action property
return "address"
end action property

on action title for p with v
return "Google Map Of (Firefox)"
end action title

on should enable action for p with v
return true
end should enable action

on perform action for p with v
set params to ""
if street of v is not missing value then set params to params & street of v & " "
if city of v is not missing value then set params to params & city of v & " "
if state of v is not missing value then set params to params & state of v & " "
if zip of v is not missing value then set params to params & zip of v & " "
try
tell application "Firefox"
OpenURL googleMaps & params
activate
end tell
on error
display dialog "You must have Firefox installed to use this plug-in."
end try
end perform action

end using terms from
-- End









Post a Comment




 
 




FYI- it doesn't work with the Safari browser on Mac. it's about time i tried FireFox anyway. thanks guys!
 


damn. wish i had a mac.
 


If you want this script to work in Safari, change the script as follows:

- find and replace the word Firefox with the word Safari
- change the line "OpenURL googleMaps & params" to read "set URL of front document to googleMaps & params"
- if you want the map to open up in a new window rather than in the current window, insert the line "make new document" before the "set URL of..." line
 


cooL!
 


Canada addresses too.
 


This is cool, and useful at the same time. I have used the mods suggested above and changed it so that it works better for the UK:

-- Start
property googleMaps : "http://maps.google.co.uk/maps?q="

using terms from application "Address Book"

on action property
return "address"
end action property

on action title for p with v
return "Google Map Of (Safari)"
end action title

on should enable action for p with v
return true
end should enable action

on perform action for p with v
set params to ""
if street of v is not missing value then set params to params & street of v & " "
if city of v is not missing value then set params to params & city of v & " "
if state of v is not missing value then set params to params & state of v & " "
if zip of v is not missing value then set params to params & zip of v & " "
try
tell application "Safari"
make new document
set URL of front document to googleMaps & params
activate
end tell
on error
display dialog "You must have Safari installed to use this plug-in."
end try
end perform action

end using terms from
-- End
 


These codes are really useful sometimes. I had a book from www.kevacorp.com.It contains all details of these types of codes,multimedia ,and all software programs. really useful and interesting.

eindu
 


another small addition to that script - to do a reverse lookup on a phone number, here's the applescript (it's made for canada, but you can substitute that url with equivalent for US or whatever other country you need - just find proper website)

using terms from application "Address Book"
on action property
return "phone"
end action property

on action title for p with v
return "Reverse Phone Lookup"
end action title

on should enable action for p with v
return true
end should enable action

on perform action for p with v
set telephone to ""
if value of v is not missing value then set telephone to value of v
try
tell application "Firefox"
OpenURL "http://411ca.whitepages.com/1234/search/ReversePhone?phone=" & telephone
activate
end tell
on error
display dialog "You must have Firefox installed to use this plug-in."
end try
end perform action
end using terms from
 


hese codes are really useful sometimes. I had a book from www.osx86spain.com.It contains all details of these types of codes,multimedia ,and all software programs. really useful and interesting.
 


Very Handy - works very well for Australian Maps too!
 









Links to this post:

Create a Link




Home






rssRSS Subscribe rssEmail Subscribe

methodshop on Facebook
Features
Thanksgiving Turkey Bowl [game]
imageTurkey Bowl is a 3D perspective target game where you celebrate the fall harvest by knocking over turkeys with bowling apples. Here's a hint, the turkeys further away are worth more points. Happy Thanksgiving!!!

arrowHow to Copy Music Off Your iPod or iPhone
mac miniHas a virus or hard drive crash wiped out your entire music collection on your computer? No problem. Here's how to copy music off your iPod or iPhone and back onto your computer.

arrowThe Biggest Bugs on Earth
bugsBugs tend to freak us out. Mosquitoes, spiders, wasps, centipedes... you name it. If it crawls, bites or buzzes anywhere near our faces, then we squirm, swat and run. But what's worse than a little bug crawling on or biting you? How about a really, really big one? Here are some of the biggest bugs on Earth. Enjoy!.

boxeearrowHack Your Apple TV with Boxee
Boxee is a free open source cross-platform media center and entertainment hub that can play movies, TV shows, music and photos, as well as streaming content from websites like Hulu, Netflix, CBS, Comedy Central, Last.fm, and flickr. All you need to hack your Apple TV so it can use Boxee is a USB stick. If you own an Apple TV, then you need Boxee. Install Boxee and set your Apple TV free.

imagearrowHow to Auto Follow People on Twitter
There's a way to auto follow your followers on Twitter. This auto follow Twitter trick can be pretty useful if you find yourself managing a Twitter account for a public figure, company or celebrity.

arrowRip DVD's for Your iPod or iPhone
handbrakeNeed something to watch on your iPod or iPhone? Here's a tutorial that explains how to use a program called Handbrake to rip DVD's into iPod compatible MPEG-4 video files.

yetiarrowYeti Sports
Like to smack penguins with baseball bats? Should your Yeti catch the penguin at the right moment and angle, you might just hit one out of the park, or arctic continent.

ipodarrowRejected iPod Engravings
When purchasing a new iPod from the Apple store, you can choose to have a custom message laser engraved on the back. These were the rejects.
 

Archives

Hot Links

Kiss Kiss - Chris Brown
If Alex Chilton were today a beautiful young woman, he'd sound like this...

Gadget Lounge
Do you like Gadgets? Come hang out in our lounge.

Blog Reader Survey
Do you read blogs? Tell them about it.


Add your link here









[ home ]
[ games ]
[ music ]
[ video ] RSSXML
digg blogpulse Technology Blogs - Blog Top Sites google mobile spain china france japan
cc View blog authority This page is powered by Blogger. Isn't yours?

Contact Us | About MethodShop.com | Search
MethodShop.com LLC ®1996-2009. All rights reserved.

methodshop.com
prev top