Page 1 of 1
[OT] AppleScript Gurus: Script to Remotely Disconnect Adium?
Posted: Mon Apr 11, 2005 4:46 pm
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.
Posted: Mon Apr 11, 2005 4:51 pm
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.
Posted: Mon Apr 11, 2005 4:55 pm
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?
Posted: Mon Apr 11, 2005 6:48 pm
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.
Posted: Mon Apr 11, 2005 7:42 pm
by Newtylicious
You better hope no one finds out this phrase. Imagine the fun they would have.
Posted: Mon Apr 11, 2005 8:16 pm
by MBHockey
Yeah, obviously. I'm thinking of making it a variant of my current AIM password.
Posted: Mon Apr 11, 2005 9:46 pm
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.
Posted: Mon Apr 11, 2005 11:09 pm
by Reikon
Code: Select all
tell application "Adium"
disconnect accounts
end tell
or
Code: Select all
tell application "Adium"
quit
end tell
Should work.
Posted: Mon Apr 11, 2005 11:14 pm
by MBHockey
Ah, okay I will try this. Thanks.
Works Great. Thanks.
