September 6, 2009
Pomodoro, Applescript and Skype?

After loudly bemoaning my inability to do back-to-back Pomodoros, due to frequent interruptions, Antony Marcano pointed me to Andy Palmer’s useful Pomodoro, Adium Applescript. In a svelte two lines, the script sets his IM client’s status to “Away”, preventing people from breaking his all important Pomodoro rhythm and then resets the status to “Available” once the Pomodoro is complete.

Spurred on by the fact that Andy had already done the hard work of coercing Applescript into playing nicely with Pomodoro.app, I delved into the API documentation, modified his scripts a bit and made them do a similar thing for Skype, which is the IM client I use at work.

This goes on one line in Pomodoro Setup -> AppleScript -> Start:

tell application "Skype" 
    to (send command "set profile mood_text Pomodoro '$pomodoroName' in Progress" script name "")
    send command "set userstatus DND" script name ""

This goes on one line in Pomodoro Setup -> AppleScript -> Reset and End:

tell application "Skype"
to (send command "set profile mood_text" script name "") 
send command "set userstatus ONLINE" script name ""