Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to toggle between AIM screen names in iChat Apps
As many people do, I have two different AIM screen names. While iChat allows you to add additional .Mac account names, it dosn't appear to have a way to allow you to toggle between two different AIM screen names.

So I wrote this script to allow you to do so. It basically rewrites a file named com.apple.iChat.AIM.plist in your ~/Library -> Preferences directory, swapping out the screen names. I'd suggest backing up this file before running this script by doing:
% cd $HOME/Library/Preferences
% cp com.apple.iChat.AIM.plist com.apple.iChat.AIM.plist.backup
Here's the script; beware of line wraps in two of the lines within the case statements -- be sure they are stretched out on one line in your copy.

#!/bin/sh

if [ $# -ne 1 ]; then
  echo 1>&2 "usage: aim second_name or first_name"
  exit 127
fi

aimfile=$HOME/Library/Preferences/com.apple.iChat.AIM.plist

case $1 in
  # remove the line break before $aimfile in each of the
  # first_name and second_name lines below
  first_name) cat $aimfile | sed 's/second_name/first_name/g' > 
    $aimfile.bak && mv $aimfile.bak $aimfile;echo "first_name now active";;
  second_name) cat $aimfile | sed 's/first_name/second_name/g' > 
    $aimfile.bak && mv $aimfile.bak $aimfile;
  echo "second_name now active";;
esac
[robg adds: I haven't tested this, as I have only one iChat ID. But you should be able to just save the script, make it executable, and then run it whenever you wish to swap your AIM name. I think you'll need to quit iChat first before running the script, though.]
    •    
  • Currently 2.25 / 5
  You rated: 1 / 5 (4 votes cast)
 
[21,098 views]  

A script to toggle between AIM screen names in iChat | 3 comments | Create New Account
Click here to return to the 'A script to toggle between AIM screen names in iChat' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
or just use defaults
Authored by: kyrrigle on Feb 02, '04 01:38:44PM
Might be easier just to use the defaults command:

defaults write com.apple.iChat.AIM LoginAs "my other screen name"
(and it still wouldn't be a bad idea to make a backup first)

[ Reply to This | # ]
or just use defaults
Authored by: Brak on Feb 02, '04 05:01:29PM

pwnd! nice reply.



[ Reply to This | # ]
A script to toggle between AIM screen names in iChat
Authored by: billabOng on Feb 02, '04 05:29:46PM

Wouldn't it be easier to just select it in the accounts tab in the preferences?



[ Reply to This | # ]