AppleScript help

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
dschep
Harmless
Posts: 2
Joined: Thu May 26, 2005 8:50 pm

AppleScript help

Post by dschep »

I was trying to make a very simple script (two actually) for use with quicksilver to connect or disconnect all my accounts.

This is the code i tried to use to disconnect my accounts:

Code: Select all

tell application "Adium"
	disconnect
end tell
This should work based of off what I read in the AppleScript dictionary for Adium, but when I run it nothing happens.

I guess i should include that the even log contains this after i run the script

Code: Select all

tell application "Adium"
	disconnect current application
end tell
Btw the behavior when running with connect as opposed to disconnect it does nothing as well with practically the same event log.
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Re: AppleScript help

Post by zaudragon »

dschep wrote:I was trying to make a very simple script (two actually) for use with quicksilver to connect or disconnect all my accounts.

This is the code i tried to use to disconnect my accounts:

Code: Select all

tell application "Adium"
	disconnect
end tell
This should work based of off what I read in the AppleScript dictionary for Adium, but when I run it nothing happens.

I guess i should include that the even log contains this after i run the script

Code: Select all

tell application "Adium"
	disconnect current application
end tell
Btw the behavior when running with connect as opposed to disconnect it does nothing as well with practically the same event log.
Maybe using "disconnect every account" would work…
Blog | X(tras)
Communists code without classes.
dschep
Harmless
Posts: 2
Joined: Thu May 26, 2005 8:50 pm

Post by dschep »

Thanks alot, it works. I didnt know i had to say every account be cause the dictionary entry reads as such:
disconnect v : Disconnect an account, or all accounts if no account is specified.

disconnect account : an account
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Post by zaudragon »

dschep wrote:Thanks alot, it works. I didnt know i had to say every account be cause the dictionary entry reads as such:
disconnect v : Disconnect an account, or all accounts if no account is specified.

disconnect account : an account
Well the dictionary isn't full… and the AppleScript support will hopefully become better in the future.
Blog | X(tras)
Communists code without classes.
User avatar
cbarrett
Adium Team
Posts: 389
Joined: Thu Dec 02, 2004 2:30 am
Location: Kailua, HI
Contact:

Post by cbarrett »

If you could file a ticket on this ( see http://trac.adiumx.com/wiki/ReportingBugs ), that'd be awesome. Either the dictionary should be changed, or the code should be fixed. Documentation should not lie! *glances in Apple's direction menacingly*
Reikon

Post by Reikon »

Code: Select all

tell application "adium"
disconnect all
end tell
Works.
Post Reply