Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Get Google directions via Address Book' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Get Google directions via Address Book
Authored by: peeejay on Apr 03, '05 05:12:46PM
I had the same problem, and, based on the original "Google Map Of" script, I modified it thus: Replace the line

if street of v is not missing value then set params to params & street of v & " "


if street of v is not missing value then
set shortstreet to street of v
if shortstreet contains "#" then
set poundcut to offset of "#" in shortstreet
set shortstreet to get text 1 thru (poundcut - 1) in shortstreet
end if
set params to params & shortstreet & " "
end if

This truncates the street at the # symbol. There may be a better syntax, but Applscript is quite picky about the offset function. Obviously google ignores the unit number, but it does get you to the front door of the building!

[ Reply to This | # ]