If you are spending a lot of time in front of the computer doing things, and these tasks are getting repetitive then you might find easier to use Mac’s Automator application. Whether it may be writing specific type of emails, or charting graphs, or anything. Just choose your poison and Automator will likely solve some of these repetitive tasks for you. My poison for this particular entry is Adium, and I’d like to tell my Adium application, to send a specific message to a specific chat group everyday at a certain time.
In case if you were wondering what Adium is, you can find the details here but It is my choice of Jabber client instead of using Mac’s Messages application. It is opensource, flexible and you can use variety of themes in here.
So if you are using Mountain Lion, like previous versions of it , the OS will come with an application called iCal, which is the default application for Calendar. We will use the Automator application to set what needs to be send to the Adium by utilizing AppleScript.
Let’s say I want to send a message that says “I am here indeed” to a specific chatroom in Adium every single day at 8:27 pm. Here is how you accomplish this task.
1 – Open up Automator. When you first launch the program, it will look like this:
2 – Click on “Calendar Alarm” icon. The next thing you need to do is to choose “Utilities” from Actions Menu on the left, and this will load bunch of templates on the right side for you. Like the image below, you will need to select “Run AppleScript”:
3 – You can find the basics of AppleScript here, which is what we are going to tell Adium what it needs to do.
The script should be as follows:
tell application “Adium”
send chat “firstname.lastname@example.org” message “I am here indeed.”
Click File -> Save, and name it like “AdiumTest”, so it should look like the following:
4 – After you click Save, iCal automatically opens up and places an event called “AdiumTest” in Today’s entry. It looks like the following:
5 – Now, all you need to do is to edit this event based on your preferences. I’d like to use this every week at 8:27 pm, so by right clicking and editing it, I have the following modified entry:
Since my Adium application is almost always open, the message is sent everyday without me typing it everytime. Also a quick note is that it takes about 14 seconds to send the message after the clock hits 8:27 pm on my machine. You may or may not get the same result but it will send it in that “minute”.
Happy Automating . . .