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: Werd on Feb 18, '05 02:34:07AM
One more thing I noticed...
Addresses get cut off on a "#" sign (as used for apartment numbers). Google Maps itself ignores apartment numbers and goes on to correctly map the addresses, but the AppleScripts choke on them.

[ Reply to This | # ]
Get Google directions via Address Book
Authored by: Werd on Feb 18, '05 03:15:39AM
Ah, I see what's wrong. The number sign (#) in the URL needs to be converted to:
%23
I don't have a clue how that urlencode script works, so can someone that knows what they're doing add an exception for this?

[ Reply to This | # ]
Get Google directions via Address Book
Authored by: aamann on Feb 18, '05 01:04:22PM

No need for an exception for # - the urlencode script already converts that to "%23"



[ Reply to This | # ]
Get Google directions via Address Book
Authored by: Werd on Feb 18, '05 11:42:02PM

It doesn't replace it for me. I get the number sign in Firefox's URL field with a "did not match any locations" error (because there's no city or ZIP, since it's not seeing anything past the number sign), and if I replace it with %23 by hand, it works fine. All other characters seem to translate fine. Is anyone else having this problem?



[ Reply to This | # ]
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 & " "

with

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 | # ]