Replicating GTD Mail Act-On behaviour with Applescript and Quicksilver Triggers

Linked on Feb 2 at 20:28

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’ll need to add the Scripts directory to Quicksilver’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.

UPDATE (2010-03-26): Quicksilver b58 contains a fix for a bug which caused triggers to become deactivated. 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:

tell application "Mail"
    set s to selection
    repeat with eachMessage in s
        set read status of eachMessage to false
        delay 0.5
        move eachMessage to mailbox "@Action"
    end repeat
end tell