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: SeattleSeth on Feb 17, '05 11:41:06AM

This script works great! However, I have multiple addresses under the 'me' card. I am not an expert scripter by any means, and was wondering how one could modify the script to pick one addreses vs. another? I have tried modifying which address to take by telling it to take the second or last address on my card (for my home address), but still takes the first address (work).

any suggestions would be greatly appreciated! thanks in advance!

-- Tell Address Book what to do when the script is selected
on perform action for aPerson with anAddress
set myAddress to first address of my card



[ Reply to This | # ]
Get Google directions via Address Book
Authored by: aamann on Feb 17, '05 12:04:35PM
Not tested but the following should work:

set myAddress to the first address whose label is "home" of my card

Of course, if you have more than one "home" address, this still might not work as expected - but then you probably should get your life together first :-)

[ Reply to This | # ]
Get Google directions via Address Book
Authored by: SeattleSeth on Feb 17, '05 12:43:14PM

thanks for the suggestions.

I tried this directly and get an error stating that access is not allowed when I try to compile. When i remove quotes from home it compiles, but then does nothing when i try to use the script in address book.

any further assistance would be apprecaited, thanks!



[ Reply to This | # ]
Get Google directions via Address Book
Authored by: aamann on Feb 18, '05 12:56:22PM
Sorry, I should have actually tried it first :-)

This one works:

set myAddress to (address 1 whose label is "home") of my card

[ Reply to This | # ]