export/backup AIM away messages?

Anyone know of a script to export/backup AIM away messages? Or know if it’d be possible and relatively simple to write one?

They’ve got instructions for exporting away messages on Windows: http://www.aim.com/help_faq/using/win/away.adp?aolp=#backup

But I can’t figure out where the data is stored on the Mac version. But maybe an Applescript could do it.

i just went and worked it out and then realized that you are probably using aim but this will work for ichat but i’ll post back with the correct script soon,

Edit: I can’t seem to work it out either.

I’ll post the ichat one now.

Saving

set customAwayMsg to do shell script "defaults read com.apple.ichat CustomAwayMessages"
--write them to a file

Reloading

--read them from a file to a variable
do shell script "defaults write com.apple.ichat CustomAwayMessages '" & customAwayMsg & "'"

Thanks very much Kim for the noble effort. Based on your script I went looking and FOUND the file the AIM away messages are stored in at least:
~/Library/Preferences/com.aol.aim.plist

I got it opened in TextWrangler but it’s in some really screwed up format, with the away messages apparently mixed in with references to BART icons.

Thanks Jacques. But I run the script and get only an empty text file (Msg_backup_Aim.txt) on the desktop.

I thought maybe it was because I don’t have a file anywhere called com.aol.aim so I tried changing that to com.aol.aim.plist instead, but got the same result. Tried running it with AIM on and off, same result.

Maybe it’s something to do with whatever delimiters are being used?
For what it’s worth, I’m using AIM version 4.7, the last version released for the Mac. If I can get my away messages out, I’m going to look into using another client.

the defaults command knows what to lookfor and where to find it so you don’t have to give it a .plist or a path.

SUCCESS!!

I had indeed already made a large number of custom away messages (which are what I wanted to export in the first place), so that wasn’t the problem. I found this app called PlistEdit Pro and opened up the AIM plist file to find…

It’s PrefsSetDict4 that all my messages are stored in! There actually was no PrefsSetDict1, but there was a 2, 3, and 4. I’m pretty sure this has everything to do with having used multiple AIM accounts with the AIM app at various times. Probably the different PrefsSetDicts are each for a different account.

I changed PrefsSetDict1 to PrefsSetDict4 and your script worked like a charm! The text now needs some cleaning up, but nothing TextWrangler/BBEdit can’t handle (e.g., remove enclosing quote marks from each line, strip html tags). Also, the body of each custom away message and the title of the message are listed separately (in that order). But the titles can probably be trashed anyway.

Thanks very much for the help!