« The Newest Addition to Clarke Street... | Main | More Burning Kombi Photos »
February 24, 2006
Mac OS X Address Book to TomTom GO 500 (or 700)
A few months ago, I purchased a TomTomGO 500 from Harvey Norman under the agreement that since my Treo 650 was not listed as compatible, I could return it if I had any trouble. They agreed, it didn’t work, I returned it, but boy, did that result disappoint me! The TomTom was a FANTASTIC device in my opinion. It WAY outshined the buggy and slow Navman 4460 kit which I had been painfully using with my Treo (although it functioned well the Treo’s predecessor, a Tungsten T3). I even tried switching to a Nokia 6680 as to preserve the TomTom, but alas, I had become too dependent on the Palm OS and QWERTY keyboards, so the TomTom had to go, and the Treo prevailed.
After the recent acquisition of an iPod (with Video) about 6 months or so later (Thank you Eva!), I decided it was long time to complete the sorting out of my car (from a technology standpoint), so I quickly researched to see if any of the recent Treo updates or potential TomTom updates had possibly now enabled compatibility, and low and behold, they had! The most crucial feature, handsfree calling and answering worked! Unfortunately, not the SMS functionality. You would have thought the Treo should have always worked from the beginning by seeing the TomTom as headset, but the TomTom insisted on initating the connection (not the pairing), and there have only been two incoming Bluetooth profiles on the Treo, OBEX Object Push (to accept Bluetooth’d files) and Dial Up Network, and they ain’t available at the same time.
So now, it appears that both are a bit better behaved in that the Treo will properly advertise itself as an Audio Gateway and an Address Book, and the TomTom behaves like a Bluetooth headset in that it only connects to the Treo once I try to make a call and the Treo only connects to the TomTom when it receives a call. Unfortunately though, the phonebook retrieval does not get numbers from your Treo’s Contacts app, rather from two other areas, your Call Log on the Treo and any Favorites you have configured in the Phone application. You can still dial a contact on your Treo, and if the TomTom is near, it will just pass it off to it like a normal Bluetooth headset, but by not having ALL of my contacts and numbers in the TomTom, I can’t tell who’s calling… and I want that feature!
After some quick research, it appears that TomTom store a simple file in the root directory of the SD card named “contacts.txt” in the following CSV looking format:
"Full name of person","+612345678"
"Full name of another","+613456789"
I’ve been mamanging the same master, digital phonebook since 1999, so I’m at about 1500 contacts and there’s no easy way to get this file created with the existing Address Book functionality, thus I decided to go with AppleScript and started away!
After writing for a short bit, I decided that there were probably others interested and I was going to share my work and thus, thought Automator would be a much better environment to create the script in so that others could modify certain aspects quite easily (like only choosing certain Address Book groups) Anyway, no such luck there, as Automator in 10.4.4 is one of the biggest, buggiest, most sluggish, unstable pieces of poop out of Cupertino in a while! My console.log just filled with all sorts of exceptions, it would crash, it would bring my [admittedly weak] 867MHz 12” PowerBook G4 to a halt and lastly, I faced a few issues with certain actions I couldn’t surpass, so I returned to just using a simple AppleScript. Here are the issues I faced in case someone can offer some help or advice:
Address Book -> Get specified Address Book items
This was the perfect action to start with. Users were presented with an interface to put together an amalgamation of groups and users and they would be passed as “Address Book Items” to the next Automator step. In the next step, I had a custom AppleScript which would arrange the Address Book info nicely. I set it up to trap for presence of Organization names, first, last, to put commas in the appropriate places, add phone number “type” flags to the end of each, like (Mo), or (H) or (W), etc.SO, anyway, my script had to somehow coerce the potential mishmash of people AND/OR group class types coming in and somehow end up with one nice big group that only contained objects of the class Person. Between that and the idea of nested groups, I couldn’t get the user supplied data nicely coerced into one large person-only group. Anyone?
Another problem with the above, is that there did not seem to be any way for the user to choose the [proverbial] group “All”, which was personally my choice!
Line endings, Text encoding and line breaks
Basically, the TomTom is a bit picky and insists on Western encoded, DOS line break ending, text files. Apple really prefers Unicode encoded, UNIX/Mac line break ending, Rich Text files. I tried using some BBEdit Automator actions like Sort Lines, Process Line Endings. and using the Text Edit -> New Text Document, but in the end, I just could not get it to run smoothly or reliably. I was very disappointed to find that the BBEdit Automator actions did not have the same fit, polish and reliability of the BBEdit app… I don’t think ANYONE, especially Apple, is really putting a lot of Q & A effort into Automator and Automator actions. Such a shame, because to me it seems like a great AppleScript framework, even for complex apps.
So, without further ado, here is my completed AppleScript for download:
There are some properties you can set in the top of this file once you open it in Script Editor (which is completely optional. Just skip this bit if you don’t know what I’m talking about):
filename
This needs an applescriptfileobject, likefile "Macintosh HD:Users;jay:Desktop:contacts.txt, but just leave it blank and run the script and it will let you choose nicely and then automatically remember your choice.progressandprogressFrequency
My 1500 person (1900 number) address book took quite a while to create this file (about 3 minutes on my PB), and there was really no visual feedback, so if you leaveprogressastrueand set theprogressFrequencyto the number of contacts you want to see a quick status report after (leave it at 25 or change to 50 for starters), you will get a dialog alert showing you a progress update. It will give you the option to cancel and it will also automatically time out after 2 seconds as to not hold up the script if you don’t want to cancel.I found what I believe is another bug here as if my mouse is not moving when one of these updates is delivered, it just flashes instantly and you can’t see it, not for the 2 seconds I’ve specified. If I’m slowly moving my mouse around in a circle, it then stays on the screen visible for you to interact with if desired.
Additionally, it appears that if Address Book does not come to the front when these dialogs appear, they don’t naturally time out.
Lastly, if I use the
cancel button 1parameter in a script that only has one button (thus is the auto-default) or thecancel buttonchoice matches thedefault buttonchoice, Address Book crashes!I think this all works fine if I use the
display dialoginstead ofdisplay alert, but man, thatdisplay alertlooks SO much more OS X!
The best place to store this file is in your User’s Library’s Script Folder, or in UNIX path-speak, ~/Libbrary/Scripts/, but you can even get a bit more clever by taking advantage of the AppleScript menu (launchable via the AppleScript Utility application), and then set this script to only appear in that menu WHILE you’re in Address Book, thus feeling like a more natural, integrated part of it. If setup right, the AppleScript menu will look like this when Address Book is frontmost:
To get this effect (which works for all Applications, use THIS path:
~/Library/Scripts/Applications/Address Book/
Usual warranties apply… as in none. If you can use this, great, please do, leave a comment, but I’m not required to support or help you (although I’ll try to a certain degree). Please also free to edit and re-use my code, just share alike!
Posted by Jay in technology at 12:28 PM
Comments
Unfortunately, the new TomTom devices (such as the Go 910) use a binary file called Buddies.dat in /contacts.
Posted by: Mothra at July 12, 2007 8:19 AM
My Dell Axim X5 (WM2003) has served me well over the years. The HAICOM GPS and Mapopolis GPS SW/Maps can not be updated. There are issues with the X5 and TomTom Navigator 6.
I also want to "retire" my Sony Laptop (500Mhz).
Household is running several Macs (PB). Since I am contemplating to get the TomTom 1; the question is, what kind of contacts list does the TomTom 1 have (binary?). If so, your process will not work for me.
Actually, that's one of the reasons, why I am holding on to the Sony (PDA sync...only app.).
Looks like I will have to re-enter appr. 800 contacts... somehow.
Thanks, I enjoyed reading your super report!
Posted by: uweb at November 5, 2007 12:23 PM
Mothra, I think the Buddies.dat is for your TomTOm Buddies as my 510 running firmware v6 still has a contacts.txt file, although it is not in a contacts subdirectory.
uweb, I'm unsure about the TomTom One, but I find that all these devices run the same operating system. However, I didn't think the TomTomOne had phone support so would be surprised if it has Contact support. You should read my other article about exporting Addresses to POI if you want contacts for the sake of navigation.
Posted by: Jay
at November 6, 2007 11:48 AM
I'm just trying to do this on my tomtom 720 cos it crashes when i get the phone to send them and it's now a contacts.txt in the contacts folder. I reckon the buddies thing is for tomtom buddies cos i have none it's empty so can't check but i synced a subset of contacts from a different phone and it put them in a contacts.txt file in the contacts folder
now to reboot and see if it worked.
Posted by: David Webb at July 6, 2008 8:33 PM
Household is running several Macs (PB). Since I am contemplating to get the Tom.Tom 1; the question is, what kind of contacts list does the Tom.Tom 1 have If so, your process will not work for me.I reckon the buddies thing is for tom.tom buddies cos i have none it's empty so can't check but i synced a subset of contacts from a different phone and it put them in a contacts.txt file in the contacts folder.I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own word press blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.i found this informative and interesting blog so i think so its very useful and knowledge able.it is Very good info.. thanks for the nice post.so i appreciate to your efforts.
Posted by: at March 26, 2009 12:11 AM
