Page 1 of 1

Applescript to connect a single account

Posted: Wed Jun 08, 2005 4:40 am
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 :-)

Re: Applescript to connect a single account

Posted: Wed Jun 08, 2005 4:41 am
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.

Posted: Wed Jun 08, 2005 4:45 am
by cometbus
I tried that, and in the past, it did nothing at all, now it gives me an error about NSReceiverEvaluationScriptError:4

Re: Applescript to connect a single account

Posted: Thu Jun 09, 2005 1:03 am
by evands
ScottHaneda wrote:the menu in Adium for doing so connects the wrong one, I aim to fix this :-)
Huh? :)

Re: Applescript to connect a single account

Posted: Thu Jun 09, 2005 1:30 am
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

Re: Applescript to connect a single account

Posted: Thu Jun 09, 2005 1:57 am
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.

Posted: Fri Jun 10, 2005 12:41 am
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?

Posted: Fri Jun 10, 2005 3:12 am
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

Posted: Fri Jun 10, 2005 3:15 am
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 “.

Posted: Fri Jun 10, 2005 4:02 am
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 :)