Using Quicksilver and AppleScript to Set Status in Adium and iChat

How's that for a long title? I use Adium for my IM and iChat for Rendezvous/Bonjour file transfer in the office. When I leave for lunch or a meeting, I have to remember to go to both apps and set my status to away and then set it to available when I return. Since time is money (or more time spent blogging), I figured I could save these precious seconds with some scripting.

I just needed to write two AppleScripts: one to set my status to away in both apps and then another to set them to available. Sure enough, it was pretty simple.

First, here's the script to set both apps to away status:

tell application “iChat”

     activate

     set status to away

end tell

tell application “Adium”

     activate

     set my status type to away

end tell

The “activate” is optional but I wanted them to come to the forefront so I could see what happened. Also, they would be there if I wanted to manually set my status back.

Here's the script to set both apps to available status:

tell application “iChat”

     activate

     set status to available

end tell

tell application “Adium”

     activate

     set my status type to available

end tell

Once I had those, it was just a matter of saving them as scripts and then setting up two triggers in Quicksilver and assigning keyboard shortcuts. I used Cmd+Option+A for Away and Cmd+Option+B for Available (or Back so it matches the letter).

Now maybe I'll go overboard and create scripts to go offline and online in both apps…

2 thoughts on “Using Quicksilver and AppleScript to Set Status in Adium and iChat

  1. This works *almost* perfectly with Adium. The only problem is that it sets the ‘Away’ and ‘Available’ state to custom versions, instead of the default.

    Where did you find the documentation in order to write these? I can’t find any anywhere.

  2. To view what is available for Adium, open the Script Editor and go to Window/Library. Click the add button and browse to Adium and select it. Then, you should be able double click on Adium in the Library window to bring up its properties.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s