Page 1 of 1

Connect / Disconnect with AppleScript?

Posted: Thu Jul 07, 2005 12:47 pm
by fahrvergnuugen1
I'm a bit green when it comes to applescript, so please bear with me. I checked all of the scripts on adiumxtras.com and I couldn't really find anything that dealt with dis/connecting accounts in Adium to use as an example.

I used the "open dictionary" feature in the script editor to see what methods adium supports.

I see: connect account : an account
and: disconnect account : an account (if no account is specified, all disconnect)

So I tried:

Code: Select all

tell application "Adium"
	activate
	disconnect
end tell
But nothing happened. Likewise, telling it to "connect account fahrvergnuugen" after I manually disconnected did nothing.

What am I doing wrong?

Posted: Thu Jul 07, 2005 1:33 pm
by Ludge
Applescript is pretty buggered in Adium right now. If you post it on trac, the devs will fix it when the get a chance.

Posted: Thu Jul 07, 2005 1:43 pm
by fahrvergnuugen1
Ludge wrote:Applescript is pretty buggered in Adium right now. If you post it on trac, the devs will fix it when the get a chance.
Okay, will do as soon as the trac comes back online (currently 500'd).

Posted: Mon Jul 11, 2005 12:10 pm
by fahrvergnuugen1
I found another entry in the trac complaining about applescript connect / disconnect syntax


This works:

Code: Select all

tell application "Adium"
	connect account 1
end tell
that will connect the first account in the list.

Posted: Mon Jul 11, 2005 3:27 pm
by evands
You're not identifying an account by name by just putting a name after the word account.

connect (first account whose UID is "fahrvergnuugen")

Posted: Mon Jul 11, 2005 3:56 pm
by fahrvergnuugen1
evands wrote:You're not identifying an account by name by just putting a name after the word account.

connect (first account whose UID is "fahrvergnuugen")
Okay, so it IS a problem with my applescript. I told ya I wasn't very good ;)