Automatically Joining a Group Chat with Adium

By · Published · apple, applescript, mac, macos

Tags: adium, apple, applescript, jabber, group chat

At dealnews, we have an internal Jabber server that we use for our internal communications. As part of that, we have a number of internal chat rooms for the various areas of the company.

I'm a big believer in automation - that is, scripting various repetitive actions that I have to do every so often. One of these little things is joining our developer chat channel each morning when I get to the office. Unfortunately, there's no built in way in Adium to do this, nor does Adium expose native AppleScript commands to join group chat. It does for other functions, but group chat functionality is conspiciously absent, even though there's a long standing feature request to implement this.

So, we have to hack it. In this case, I used AppleScript to imitate keyboard input

set CR to ASCII character of 13
tell application "System Events"
tell application "Adium" to activate
keystroke "j" using {command down, shift down}
keystroke "development"
keystroke CR
end tell

So we have a script, but how to automate the launching of it?

I mentioned MarcoPolo before. It has quickly become one of my favorite pieces of Mac software. In this case, I use MarcoPolo to launch the AppleScript (with a 10 second delay to allow time for Adium to start and connect to the Jabber service). You can launch AppleScripts using the osastart utility like so:

/usr/bin/osastart /Users/codelemur/Scripts/DevChat_AutoJoin.scpt

It sucks that it's like this, and I wish they would expose a more native way to do this, but it does work.

( Comments )

Did something I wrote help you out?

That's great! I don't earn any money from this site - I run no ads, sell no products and participate in no affiliate programs. I do this solely because it's fun; I enjoy writing and sharing what I learn.

All the same, if you found this article helpful and want to show your appreciation, here's my Amazon.com wishlist.


Related Posts

Creating an iTunes Dropbox on a Mac

Automatically Setting Adium IM Status with AppleScript


comments powered by Disqus