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


Click here to return to the '10.3: Add a burger locator to Address Book' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Add a burger locator to Address Book
Authored by: Don Faulkner on May 05, '04 02:05:23PM

I discovered that In-n-out's web locator doesn't understand zip+5 formatted zip codes. As such, I've made a few modifications to the script. In essence, checking for zip of e is fine if all you're concerned about is whether it's defined or not. When actually referring to it, you only want characters 1 thru 5, but for some reason characters 1 thru 5 of zip of e doesn't work. So, I do the following instead:


set zipFull to zip of e
set zipFirstFive to characters 1 thru 5 of zipFull
return "In-n-Out Burger locator for zipcode " & zipFirstFive

...

set zipFull to zip of e
set zipFirstFive to characters 1 thru 5 of zipFull
set burgerURL to 
   "http://www.in-n-out.com/cgi-bin/zipsearch.pl?zipcode=" & zipFirstFive

I'm just getting started with apple script, so I'm sure there's a more efficient way than calculating the first 5 characters twice as I've done here, but it's not currently worth my time to figure it out. Of course, if someone wants to enlighten me, I'd be very appreciative.



[ Reply to This | # ]