Connect / Disconnect with AppleScript?

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
fahrvergnuugen1
Harmless
Posts: 11
Joined: Wed May 18, 2005 3:25 pm

Connect / Disconnect with AppleScript?

Post 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?
Ludge
Latté
Posts: 79
Joined: Sat Mar 19, 2005 5:20 pm

Post 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.
Image
fahrvergnuugen1
Harmless
Posts: 11
Joined: Wed May 18, 2005 3:25 pm

Post 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).
fahrvergnuugen1
Harmless
Posts: 11
Joined: Wed May 18, 2005 3:25 pm

Post 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.
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post 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")
The duck still burns.
--
My company: Saltatory Software. Check it out :)
fahrvergnuugen1
Harmless
Posts: 11
Joined: Wed May 18, 2005 3:25 pm

Post 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 ;)
Post Reply