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


Click here to return to the 'UK Modification' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
UK Modification
Authored by: ukkarhu on May 03, '05 05:50:06PM
These files work fine if you are in the USA, but in the UK, they don't do a good job. Fortunately, by only using UK postcodes, you can get a good approximation. To do this, modify the files using Script Editor, click compile, then save. Probably best to make a backup of these files before editing: For Google Map.scpt, modify the line a couple of lines below the line '--This is where the magic happens' from:

if zip is missing value then
		set addressURL to stripReturn(street) & ", " & city & ", " & state
	else
		set addressURL to stripReturn(street) & ", " & zip
	end if
to:

if zip is missing value then
		set addressURL to stripReturn(street) & ", " & city & ", " & state
	else
		set addressURL to zip
	end if
Now click 'compile' then 'save'. Change the same lines on the file 'Google Map directions.scpt'. Now if your address has a postcode, only this will be passed to Google map and this seems to work really well.

[ Reply to This | # ]
UK Modification
Authored by: ukkarhu on May 03, '05 06:01:39PM
Oops - for the 'Google Map directions.scpt', the idea is the same and the lines are in the same location (just below the comment '--this is where the magic happens'), but there are now two parts - myzip and tozip. Change the line so it reads:

if myzip is missing value then
		set addressURL to stripReturn(mystreet) & ", " & mycity & ", " & mystate
	else
		set addressURL to myzip
	end if
	
	set addressURL to addressURL & " to "
	
	if tozip is missing value then
		set addressURL to addressURL & stripReturn(tostreet) & ", " & tocity & ", " & tostate
	else
		set addressURL to addressURL & tozip
	end if
i.e. delete the bits just after each 'else' statement so only the 'myzip' and 'tozip' parts are passed to the addressURL variable.

[ Reply to This | # ]