Address Book Woes Unwoed

|

Today I installed Leopard on my MacBook. It was hard.

It should be noted that my harddrive died a few months back, and the Genius Bar replaced it with a blank new one, on which Tiger was restored. I didn’t realize it at the time, but they screwed up and installed a drive partitioned under the old partition map scheme, not the new GUID scheme required by Leopard. Honest mistake - I don’t think it mattered until Leopard anyway, but most of the Intel MacBooks out there did apparently ship with the new style drives, so it was kind of a bummer. I ended up having to repartition completely, wiping my drive clean.

I backed up everything to a firewire drive first so the transition to Leopard wasn’t THAT bad, just kind of a hassle. Once it was all up and running though, I decided to get all my contacts off of my iPhone and into my Address Book. I’m a little fuzzy on the details (or I blocked them out due to shock) but somehow when I synced my phone, I lost all of my contacts. Major disaster. Of course I have no backups of THAT (can’t wait for Time Machine) so I started loading up as many contacts as I could remember, and imported our company roster in there as well.

Unfortunately, that’s where I hit the most annoying snag of this whole debacle. Once I figured out how to do groups in Address Book, I thought “hey it’d be nice to set the company field for all of my coworkers to ‘Emma Inc.’” Of course after playing with the UI for about 30 minutes I realized it can’t be done - a fact which Google confirmed. Nope, no point-and-click option here. Time to learn AppleScript apparently! Well I figured out enough to write a tiny script that grabs everyone in the group called “Emma” and sets their company field to “Emma Inc.” As an added bonus, I noticed that a small handful of cards had a nickname set to the same thing as their real name, so I threw in something to kill off the nickname field too. Here it is. Marvel at its complexity!

tell application "Address Book"
    repeat with this_person in every person of group "Emma"
        set organization of this_person to "Emma Inc."
        delete nickname of this_person
    end repeat
end tell

Comments

Post a comment: