On Nov 15, 2005, at 19:08:08, Dave Lyons wrote: On Nov 14, 2005, at 9:36 PM, Ed McNichol wrote: I have 15 users who share three computers. Each COMPUTER has an iChat account. I want the user logged into the iChat account appropriate for that computer. Users preferences are shared from a network log on. I would like to script this to happen at log on.
I don't know how to make this work, but I got a little bit further. The dictionary indicates that "log in" takes a reference to the account to be logged in
From what I can tell this is just a case of a misleading dictionary entry. The only object I can get iChat's 'log in' command to accept is a reference to the service (AIM, Bonjour, Jabber) that is to be logged into. Accounts themselves are defined in iChat preferences, and only one can be the 'default' account for each service.
Here's a script I wrote that switches between the two AIM accounts that I've set up in iChat. Perhaps you can modify this so that it's useful for your situation.
Michael Henley
tell application "iChat" to quit tell application "System Events" if "iChatAgent" is in name of every process then do shell script "killall iChatAgent" tell the property list file ((path to preferences as string) & "com.apple.iChat.AIM.plist") set aim_accounts to name of property list items of property list item "Accounts" set active_account to value of property list item "ActiveAccount" repeat with x in aim_accounts set y to the contents of x if y is not the active_account then copy y to the value of property list item "ActiveAccount" end if end repeat end tell end tell tell application "iChat" to log in service "AIM" |