0 Replies Latest reply: Aug 19, 2013 4:43 PM by vyente
vyente Level 1 (0 points)

Can someone give me some help in regard to how i can setup iChat/iMessage to automatically launch when a network user logs in to a machine and add their name? I've setup an Open Directory server where any user can log into any machine on the network. Id like to have iChat/iMessage launch and auto populate using the logged in user info. Im asuming i can have this script run with Profile Manager.

A friend of mine created a script for me but hes fairly new to Apple scripting so im not sure if its done correctly. Has anyone else tried to do this?


I want to use bonjour since it is the simplest way to accomplish this.



set userName to short user name of (system info)

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 ("/Users/" & userName & "/Library/Preferences/" & "com.apple.iChat.AIM.plist")

        tell the first property list item of property list item "Accounts"

            copy name to account_id

            copy an_account to the value of property list item "LoginAs"

        end tell

        copy account_id to the value of property list item "ActiveAccount"

    end tell

end tell

tell application "iChat" to log in

macpro \ macbookpro, Mac OS X (10.6.5)