[OT] AppleScript Gurus: Script to Remotely Disconnect Adium?

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm

[OT] AppleScript Gurus: Script to Remotely Disconnect Adium?

Post by MBHockey »

What i am looking to do is make a script, so that when i IM myself a unique message, Adium will disconnect.

I need this because i don't like to be signed on in multiple locations, and if for some reason i want to sign myself off from my home computer, but i am at the library, i'd like to send a message to my screen name that will disconnect adium.

I poked around the script dictionary for Adium, and think i may be able to use the 'content message' or 'content' classes, but i know very little AppleScript.

Thanks in advance for any suggestions.
User avatar
TheSilverFox06
Grandé
Posts: 770
Joined: Fri Dec 03, 2004 10:16 pm
Location: St. Paul, MN

Post by TheSilverFox06 »

I don't know enough about applescript to do exactly what you're asking, but I know one thing you could do is enable remote login, then kill Adium from that.
User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm

Post by MBHockey »

Interesting, i know nothing about remote login, but i'll look into it after i get back from class...if i enable remote login, can i log in to my mac from a Windows PC?
User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm

Post by MBHockey »

Just got back from class, looked into it for a min, and it seems that i'd have to set up an SSH client on any computer i want to use prior to being able to remotely connect.

If this is true, I think the AppleScript (if someone knows how to do it) would be a more feasible option.

Thanks for the suggestion though.
User avatar
Newtylicious
Muffin
Posts: 42
Joined: Sun Dec 19, 2004 7:13 pm

Post by Newtylicious »

You better hope no one finds out this phrase. Imagine the fun they would have.
User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm

Post by MBHockey »

Yeah, obviously. I'm thinking of making it a variant of my current AIM password.
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

For security purposes, Adium doesn't parse incoming IMs for purposes of executing files or triggering scripts...

However, here's a random thought:
Make a new screen name. MBHockeyDisconnect or something.
In your home Adium, set up the events pane with an event:
When MBHockeyDisconnect connects [or is seen, probably would work the same way], execute an applescript
Then select an applescript you've made which is along lines of

Code: Select all

tell application "Adium"
tell each account to disconnect
end tell
(i'm not good at applescript, but it will be something like that or perhaps a "for each account in every account" type thing)

Then, when you want to disconnect your accounts at home, just connect with that account from the library.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
Reikon

Post by Reikon »

Code: Select all

tell application "Adium"
				disconnect accounts
			end tell
or

Code: Select all

tell application "Adium"
				quit
			end tell
Should work.
User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm

Post by MBHockey »

Ah, okay I will try this. Thanks.

Works Great. Thanks. :)
Post Reply