Applescript to connect a single account

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
cometbus
Latté
Posts: 84
Joined: Fri Dec 03, 2004 11:54 pm

Applescript to connect a single account

Post by cometbus »

How can I use AppleScript to connect a particular account, the menu in Adium for doing so connects the wrong one, I aim to fix this :-)
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Re: Applescript to connect a single account

Post by zaudragon »

ScottHaneda wrote:How can I use AppleScript to connect a particular account, the menu in Adium for doing so connects the wrong one, I aim to fix this :-)

Code: Select all

tell application "Adium"
    connect account ""
end tell
Not tested; no guarantees.
Blog | X(tras)
Communists code without classes.
cometbus
Latté
Posts: 84
Joined: Fri Dec 03, 2004 11:54 pm

Post by cometbus »

I tried that, and in the past, it did nothing at all, now it gives me an error about NSReceiverEvaluationScriptError:4
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Re: Applescript to connect a single account

Post by evands »

ScottHaneda wrote:the menu in Adium for doing so connects the wrong one, I aim to fix this :-)
Huh? :)
The duck still burns.
--
My company: Saltatory Software. Check it out :)
cometbus
Latté
Posts: 84
Joined: Fri Dec 03, 2004 11:54 pm

Re: Applescript to connect a single account

Post by cometbus »

evands wrote:
ScottHaneda wrote:the menu in Adium for doing so connects the wrong one, I aim to fix this :-)
Huh? :)
In the Adium menu in the Finder bar or the dock, there is "Available" and it will sometimes connect to one of my two accounts, and sometimes to both. Generally, it connects to the second account, which I almost never use, so it is wrong.

I explained it as best as I can here:
http://trac.adiumx.com/ticket/501
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Re: Applescript to connect a single account

Post by evands »

ScottHaneda wrote:
evands wrote:
ScottHaneda wrote:the menu in Adium for doing so connects the wrong one, I aim to fix this :-)
Huh? :)
In the Adium menu in the Finder bar or the dock, there is "Available" and it will sometimes connect to one of my two accounts, and sometimes to both. Generally, it connects to the second account, which I almost never use, so it is wrong.

I explained it as best as I can here:
http://trac.adiumx.com/ticket/501
It reconnects whichever accounts were online when you last quit, or, if you haven't just launched Adium, it reconnects the last connected account(s). Why not do one of the following:
a) Choose the account in the File menu, which will connect it and restore it to the previous status state it was in
b) Choose the account in the Status menu, which will connect it and restore it to the previous status state it was in
c) Choose a status in the submenu for the account in the Status menu, which will connect it and set it to the selected status.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
cometbus
Latté
Posts: 84
Joined: Fri Dec 03, 2004 11:54 pm

Post by cometbus »

Basically, your suggestions all work, but they are just too much mousing around for me. I want a simple applescript I can bind to a key to do what I want, and that connection script does not seem to work, any ideas?
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

ScottHaneda wrote:Basically, your suggestions all work, but they are just too much mousing around for me. I want a simple applescript I can bind to a key to do what I want, and that connection script does not seem to work, any ideas?
I see. What about
tell application "Adium"
connect the first account with UID "myAccountName"
end tell
The duck still burns.
--
My company: Saltatory Software. Check it out :)
cometbus
Latté
Posts: 84
Joined: Fri Dec 03, 2004 11:54 pm

Post by cometbus »

evands wrote:
ScottHaneda wrote:Basically, your suggestions all work, but they are just too much mousing around for me. I want a simple applescript I can bind to a key to do what I want, and that connection script does not seem to work, any ideas?
I see. What about
tell application "Adium"
connect the first account with UID "myAccountName"
end tell
Expected “given”, “with”, “without”, other parameter name, etc. but found “.
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

My off-the-cuff applescript is bad.

Code: Select all

tell application "Adium"
	connect the first account whose UID is "myAccountName"
end tell
Tested it that time, it does work :)
The duck still burns.
--
My company: Saltatory Software. Check it out :)
Post Reply