Simplify the deletion of Mail's junk mail

Feb 20, '06 06:40:00AM

Contributed by: robg

For as long as I've can recall, I've been following the same routine with Mail's Junk folder: I open the folder, scan the subjects of any trapped messages, and then open anything that looks like it might have been a regular piece of email. After moving any improperly flagged mesasges to their proper homes, I then delete the junk mail.

Unfortunately, for as long as I can recall, this action has required two keyboard actions--Command-Option-J, the Erase Junk Mail shortcut, followed by a press of the Return key to say Yes, I really want to delete the junk mail. I believe I submitted a feature request a few years back, asking for an option to remove the second dialog, but nothing ever came of it. When I tell Mail to delete my junk mail, I'm already sure I want it gone, and I find the confirmation dialog quite annoying.

Today it finally annoyed me to the breaking point, so I created a solution using Butler. I wrote a very simple keyboard macro to handle the emptying of my Junk folder. (I would assume something quite similar is possible in both Quicksilver and LaunchBar, but I don't have much experience with either of those tools.) Now, with the press of one keyboard combo, my Junk mail folder is emptied without any further interaction on my part.

To create a new keyboard macro in Butler, click the Plus sign at the lower left corner of Butler's configuration window, then select Smart Item -> Keystrokes from the pop-up menu. While you could create this command in any of Butler's item types, it probably makes the most sense to store it in Hidden, since you'll only be accessing it via a keyboard shortcut. Give it a useful name (so you recognize it in Butler's configuration list), and then enter the following values on each tab:

When you're done, the Keys and Triggers tabs should look like this (click for a larger version):


And that's it -- you're done. Switch back to Mail, hit Shift-Command-Option-J (or whatever you assigned) and revel in the now-automated junk mail deletion.

You could use a minor variant of this to make erasing all deleted messages a one-step affair--just use Command-K as the first step of the script, as that's the relevent shortcut. I haven't done this myself, though, as I'm not so confident about erasing my deleted messages.

Comments (13)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060219072659801