Display Meetings From Entourage Using GeekTool

I’ve been a recent convert to GeekTool, a Mac application that can be used to display the output of shell commands directly on the desktop. After going through the usual cool little GeekTool ideas of displaying process lists, system uptime, and the currently playing song from iTunes etc. I decided to do something that was genuinely useful for my day-to-day use ;-)

At work we use MS Entourage for our email and calendaring. I thought it might be handy to be able to see at a glance what meetings I had scheduled without needing to switch away from my inbox. As a result I turned my hand to a little AppleScript to pull a list of forthcoming meetings from Entourage,

set currentDate to current date
if application "Microsoft Entourage" is running then
    tell application "Microsoft Entourage"
        set selectedEvents to every event where its start time is greater than currentDate
        set eventString to ""
        repeat with currentEvent in selectedEvents
            set eventTitle to subject of currentEvent
            set eventDate to start time of currentEvent
            set eventString to eventString & eventTitle & " - " & eventDate & "n"
        end repeat
        if eventString is not equal to "" then
            set eventString to "Upcoming...n" & eventString
        else
            set eventString to "Nothing upcoming...n"
        end if
        eventString
    end tell
end if

Save this somewhere as meetings.scpt, then the GeekTool PrefPane add a new entry and in the command tab select the shell option and enter osascript path/to/meetings.scpt in the command field.

Done