“Hey, Where’s Nancy’s Address?” (An AppleScript Tale) [UPDATED]

2621

I had a problem: after setting up my beloved 8600 in an office away from home, there was only the iBook for both my wife and I to use for email and other online activities. But each of us had different email address books. What to do?

First you should know that I still use Claris Emailer on both our Macs. Perhaps other email clients have ways of finessing the matter of two different sets of addresses, I don't know. I've never used anything but Emailer. I love Emailer. When the day comes that I hate it, I'll try something else, but I have never had a single problem with the venerable email client.

At any rate, Emailer uses a folder called "Claris Emailer Files," within which reside things like the Address Book, Mail Database, and a whole lot more. My addresses were similar to my wife's but not in all cases. A few nights ago I took Kathy's Address Book out of the Claris Emailer Files folder, moved it to a "Temporary" folder and renamed it "K's Address Book," then dragged my own Address Book to the Emailer Files folder. I needed some special Applelinks addresses, you see, to do some late-night editor work, and with my Address Book in the Emailer Files folder, my addresses appeared when I launched the app. (If your email client allows multiple address books, and for that matter, if Claris allows this but I don't know it and you do, then more power to you. The only solution I'm aware of is moving and renaming the files.)

Naturally, the next morning Kathy needed to send an important message to Nancy L., whose address no longer magically appeared after typing her name. This was not good, especially since it happened after I had left for work. I quickly emailed my wife instructions on how to move and rename the address book files, but something must have gotten garbled along the way and it didn't work...

That night I sat down to perform the tedious renaming and file-moving chores when it hit me: why not record all of these steps as an AppleScript? Like most Mac users, I have rarely delved into the eminently useful capabilities of AppleScript, but this seemed like the perfect opportunity.

I located Script Editor inside the AppleScript folder in the Apple Extras folder and set to work. Basically all you have to do is open Script Editor, type in a description of what it is you're about to do, then click "record" and do whatever it is you want to do. When you're finished, click "stop" and save the script as a compiled script or applet. Launching the script will then make your Mac repeat whatever steps you recorded, just like magic.

I recorded and saved two such scripts. One of them exchanges Kathy's Address Book for mine and the other puts it back again. I had to try several times before I got it exactly right, but it wasn't hard and I never read any directions. The actions I recorded involve opening four different folders, moving and renaming two different files, and closing everything up again. As far as I'm concerned, this is magic.

(And it's done wonders for keeping the peace!)

UPDATE: 9-13-01, 12:07 a.m. MDT -- A little knowledge is a dangerous thing, it seems. Naturally there is a simpler way to do what I did above using an AppleScript. A faithful correspondent has just reported in with this ingenious solution, no doubt derived from actually reading the instructions for Emailer. Then again, maybe not. I couldn't find this mentioned anywhere: :

"Make two 'Claris Emailer Files' folders on Kathy's hard disk (anywhere, but within folders called 'Kathy' and 'John' makes sense) then holding down F5 as Claris Emailer launches will allow you to select which set you are going to use for that session."


{bio}



Tags: Blogs ď Hands On Mac ď

Login † or † Register † †

Follow Us

Twitter Facebook RSS! http://www.joeryan.com Joe Ryan

Most Popular

iPod




iPhone

iLife

Reviews

Software Updates

Games

Hot Topics

Hosted by MacConnect - Macintosh Web Hosting and Mac Mini Colocation                                                    Contact | Advanced Search|