Like many other power users I am using a simple approach to email: Inbox Zero. The goal is to clean up your email inbox at the end of the day. Emails you've already processed are moved to an Archive folder. I've seen a lot of Apple Scripts in the wild to move emails to a local Archive folder or all emails to IMAP Archive folders for every account. But I did not came across a script that only moves selected emails to IMAP Archive folders. Hence being a nerd, I wrote my own:
tell application "Mail"
set _sel to the selection
repeat with _message in _sel
set _mb to mailbox of _message
set _acct to account of _mb
try
set _archive_box to _acct's mailbox "Archive"
on error
display alert "No “Archive” mailbox found for account “" & ¬
_acct_name & "”."
return
end try
move _message to _archive_box
end repeat
end tell
The script above iterates over every selected email message, searches for an 'Archive' folder in the respective account and moves it to this folder. I am using FastScripts by Red Sweater Software to invoke the script using cmd+shift+A.
This work is derived from the 'Simple Inbox Archiving Script for Apple Mail' by John Gruber of Daring Fireball.
July 13th, 2011 • Permalink
07/13/2011 - My Inbox Archiving Apple Script for Apple Mail
06/22/2011 - I love Blocks
04/05/2011 - Getting rid of the shadow in UIWebView
01/14/2010 - Got the keys to the new headquarter office
11/05/2009 - Snowtape at the Mac Consumer Show
11/05/2009 - iPhone Tech Talk in Hamburg
07/06/2009 - HDCrashReporter - Cocoa crash reporter class
04/01/2009 - HUD Panels are driving me nuts
03/26/2009 - Regarding MacHeist
03/07/2009 - Unboxing my new 24
02/18/2009 - How to name your lite iPhone app