{"id":968,"date":"2010-02-02T20:28:30","date_gmt":"2010-02-03T01:28:30","guid":{"rendered":"http:\/\/crazedmonkey.com\/blog\/links\/mail-applescript-and-quicksilver-triggers.html"},"modified":"2010-03-26T16:38:53","modified_gmt":"2010-03-26T20:38:53","slug":"mail-applescript-and-quicksilver-triggers","status":"publish","type":"post","link":"http:\/\/crazedmonkey.com\/blog\/links\/mail-applescript-and-quicksilver-triggers.html","title":{"rendered":"Replicating GTD Mail Act-On behaviour with Applescript and Quicksilver Triggers"},"content":{"rendered":"<p>I used Mail Act-On for one purpose: to quickly sort my inbox mail into action, hold and archive boxes. Unfortunately, Mail Act-On costs money. Fortunately, those simple actions can be done with Applescript and Quicksilver triggers. You&#8217;ll need to add the Scripts directory to Quicksilver&#8217;s catalog for this to work. The triggers should be configured to execute the script in the Mail context only. The script grabs the message from the selection in Mail.<\/p>\n<p>UPDATE (2010-03-26): <a href=\"http:\/\/github.com\/tiennou\/blacktree-alchemy\/downloads\" title=\"Quicksilver downloads on github\">Quicksilver b58<\/a> contains a fix for <a href=\"http:\/\/github.com\/tiennou\/blacktree-alchemy\/issues\/issue\/57\" title=\"Custom triggers with scope become disabled when Quicksilver loses focus\">a bug which caused triggers to become deactivated<\/a>. Also, the script linked above marks the mail as read just before moving, or at least it does for me. To combat that, I added a delay between set the status as unread and moving the mail:<\/p>\n<pre><code>tell application \"Mail\"\r\n    set s to selection\r\n    repeat with eachMessage in s\r\n        set read status of eachMessage to false\r\n        delay 0.5\r\n        move eachMessage to mailbox \"@Action\"\r\n    end repeat\r\nend tell<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I used Mail Act-On for one purpose: to quickly sort my inbox mail into action, hold and archive boxes. Unfortunately, Mail Act-On costs money. Fortunately, those simple actions can be done with Applescript and Quicksilver triggers. You&#8217;ll need to add the Scripts directory to Quicksilver&#8217;s catalog for this to work. The triggers should be configured&nbsp;&hellip;&nbsp;<a class=\"read_more\" href=\"http:\/\/crazedmonkey.com\/blog\/links\/mail-applescript-and-quicksilver-triggers.html\" rel=\"bookmark\" title=\"Continue reading &ldquo;Replicating GTD Mail Act-On behaviour with Applescript and Quicksilver Triggers&rdquo;\"><span>Read more<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[33],"tags":[],"_links":{"self":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/968"}],"collection":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/comments?post=968"}],"version-history":[{"count":2,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/968\/revisions"}],"predecessor-version":[{"id":1109,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/968\/revisions\/1109"}],"wp:attachment":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/media?parent=968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/categories?post=968"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/tags?post=968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}