Presence

While I absolutely despise the Microsoft Lync client for Mac (as I’ve discussed before), there is one thing it does fantastically well: presence.

Because it’s hooked in and able to talk with Exchange, it knows what is on my calendar and can set my presence accordingly (away, do not disturb, available, etc), and without my having to do anything to make it happen.  That’s cool.

Adium doesn’t do that… and a couple of quick searches turned up very little in the way of existing add-on’s that provide the ability either.  There are a couple that come close to this, but they don’t’ set your status itself, but rather the text displayed in your away message.

Rather than admit defeat, I decided to build it myself. 

One of Adium’s strengths is it’s full support for AppleScript.  This allows the creation of scripts to control functionality within the app – and allows for some powerful automation and linking with other applications… such as iCal*.

This is built with two scripts.  The first script (AdiumPresence) calls the second script (CurrentICalEvent) to get status from iCal, then updates your status to either away or available, with status text.

To make it work, I chose to use cron to execute AdiumPresence every 15 minutes.  I chose 15 minutes as that’s the natural time barrier for most meetings.

To set the cron job up I used Cronnix, which allows for easy editing via GUI.

You can find the script files here.

*As of version 0.2 this does work for recurring meetings.  Due to the way iCal stores recurring meetings significant logic was needed to determine of a recurring meeting was occurring. This should be working now, so please let me know if this does not work.

 

About John

John is a 31 year old husband, cyclist, runner, photographer, blogger, product manager, beer brewer and wine snob. Not necessarily in that order.
This entry was posted in General. Bookmark the permalink.

One Response to Presence

  1. Pingback: Microsoft Lync via Adium | Missing Link

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>