{"id":189,"date":"2009-07-02T15:21:56","date_gmt":"2009-07-02T15:21:56","guid":{"rendered":"http:\/\/andypalmer.com\/?p=189"},"modified":"2009-07-02T15:21:56","modified_gmt":"2009-07-02T15:21:56","slug":"pomodoro-applescript-and-adium","status":"publish","type":"post","link":"https:\/\/andypalmer.com\/2009\/07\/pomodoro-applescript-and-adium\/","title":{"rendered":"Pomodoro, AppleScript and Adium"},"content":{"rendered":"

I downloaded this Pomodoro Timer<\/a> from the Apple website.
\nIt has support for AppleScript events, so I created a script that automatically sets my Adium status to away (with an auto-reply) while I am working on a Pomodoro and automatically sets it to Available when I have finished.<\/p>\n

After much messing around, trying to work out just how the AppleScript pseudo-natural-language works, I ended up with this to set the away status:<\/p>\n

\r\n-- This goes on one line in Pomodoro Setup -> AppleScript -> Start\r\ntell application \"Adium\" \r\n  to set the status of every account whose status type is available \r\n  to the first status whose title is \"Pomodoro In Progress\"\r\n<\/pre>\n

and this to set it back to available:<\/p>\n

\r\n-- This goes on one line in Pomodoro Setup -> AppleScript -> Reset and End\r\ntell application \"Adium\" \r\n  to set the status of every account whose status type is away \r\n  to the first status whose title is \"Available\"\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

I downloaded this Pomodoro Timer from the Apple website. It has support for AppleScript events, so I created a script that automatically sets my Adium status to away (with an auto-reply) while I am working on a Pomodoro and automatically sets it to Available when I have finished. After much messing around, trying to work […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[31,30,32],"_links":{"self":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts\/189"}],"collection":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":8,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts\/189\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}