Enabling Bonjour in iChat using applescript

Hi all, I’m pretty new to Applescripting so forgive me if my questions seem pretty basic.

I have to write a script that will automaticaly launch iChat and log in to Bonjour. I’ve got the launching part sorted but can’t figure out how to log-in/enable Bonjour through Applescript.

I have tried:

tell application "iChat" to log in service "Bonjour"

to no no avail but I presume that is because the service is not enabled.

So I had a look through the dictionary and found “enable (boolean) : Is the service enabled?” under iChat Suite/Service. Is it possible to enable this with a script?

I have tried many variations of

tell application "iChat" to set service "Bonjour" to set property enabled to "TRUE"

but keep getting errors.

An help or pointers would be much appriciated.



The boolean property does not need to be quoted. You’re feeding it a string “TRUE” when it just needs to be true.


Thanks for the pointer but I still got some errors but finaly got the syntax right with this:

tell application "iChat"
			delay 2
			set enabled of service "Bonjour" to true
			log in service "Bonjour"
		end tell

Works like a charm.