Customizing Mail 2.0: Mail Act-On

Posted by Pierre Igot in: Mail
June 24th, 2005 • 5:17 am

I’ve just discovered a terrific enhancement for Mac OS X’s Mail.

It’s called Mail Act-On. It’s open source software. And it works extremely well.

It takes advantage of the fact that, when you are not composing a new e-mail message or a reply, typing letters doesn’t do anything in Mail. For example, you still cannot use alphabetical letters on the keyboard to jump to specific messages in your Inbox. (When the e-mails are sorted by subject line, for example, you should be able to type “P” to jump directly to the list of e-mails whose subject line begins with the letter “P”. But you cannot.)

Mail has a number of built-in keyboard shortcuts, and you can add your own using Mac OS X’s “Keyboard Shortcuts” tab in the “Keyboard & Mouse” preference pane in System Preferences.

But there are still lots of things that you can’t do with Mail and Mac OS X’s built-in features. For example, while you can define a keyboard shortcut for, say, the “Remove Attachments” command in the “Message” menu, you cannot define a keyboard shortcut for destinations to move messages to.

If you have a mailbox called “Friends & Family” in your mailboxes structure, you can move messages to this mailbox either by dragging them to the mailbox in the mailbox sidebar or by using the “Move To” command in the “Message” menu (or in the contextual menu that control-clicking on the message brings up). The “Friends & Family
mailbox will appear as a menu command under “Move To > On My Mac >“.

However, even though it does appear as a menu command in that particular submenu, assigning a keyboard shortcut to the menu command “Friends & Family” in Mac OS X’s “Keyboard Shortcuts” tab in the “Keyboard & Mouse” preference pane in System Preferences will not work.

In versions of Mail prior to Mail 2.0, you could create a Mail-specific AppleScript script to do this action, and then assign a keyboard shortcut to the AppleScript script itself. So there was a way around this limitation.

Unfortunately, in Mail 2.0, Apple eliminated the Mail-specific Scripts menu, so you can no longer do this. You can still create Mail-specific AppleScripts scripts and have them appear in the system-wide AppleScript menu on the right-hand side of the menu bar when you are in Mail, but you can no longer assign keyboard shortcuts to them. I guess it’s a case of “What Apple gives us, Apple can take away.”

That’s where Mail Act-On comes to the rescue. With Mail Act-On installed as a Mail add-on, you can create keyboard shortcuts for any sequence of actions that can be defined using Mail’s built-in Rules engine. You define Mail Act-On-specific rules that will be ignored during the regular application of Mail’s rules, but will be invoked using specific keyboard shortcuts that involve first a (customizable) trigger key and then any key on the keyboard.

The default trigger key in Mail Act-On is the back tick, which presumably is a readily accessible key on the standard US keyboard. On my Canadian CSA keyboard, I am using the forward slash as the trigger key. As I said, this does not affect the use of the forward slash as a regular keyboard key to insert the forward slash character while you are composing mail, because Mail Act-On can only be invoked when you are viewing a list of messages, not when you are composing an e-mail message.

Then I have a set of Mail Act-On-specific rules to move messages to specific mailboxes. For example, in order to move messages to the “Friends & Family” mailbox mentioned above, all you have to do is create a Mail Act-On rule called “Act-On:f|Move to Friends & Family” with a non-restrictive condition such as “Every Message” and an action that moves the message to the mailbox.

The “f” in the name of the Mail Act-On rule is the shortcut. This means that, the next time you get a message, if you select it in your Inbox and then press the forward slash (trigger key) followed by “f“, Mail will automatically move the selected message to the mailbox in question. Excellent!

You can, of course, define all kinds of other actions that can be triggered by the Mail Act-On trigger key followed by another key. In fact, since the actions in Mail’s rules can include the execution of an AppleScript script, you can pretty much do anything!

The only problem I have found with Mail Act-On is that it seems to interfere with keyboard shortcuts involving the Control key. After installing Mail Act-On, if I try to use a keyboard shortcut such as Control-R, Mail Act-On intercepts the keystrokes and tries to find a Mail Act-On rule with “r” as the trigger key instead.

But in fact this “problem” can be considered a benefit in disguise, because this means that you can invoke Mail Act-On rules without using the trigger key, and with something that behaves exactly like a keyboard shortcut (instead of a succession of two keystrokes).

And it doesn’t affect shortcuts that involve the Control key combined with another modifier key, such as the Command key, so the impact is minimal. (There are no built-in keyboard shortcuts in Mail using the Control key, so this would only affect user-defined shortcuts using the Control key.)

This Mail Act-On add-on is definitely a great improvement, and it’s free — so there’s little risk involved in giving it a try. The only thing you need to be aware of is that, the “Act-On” rules are defined as Mail rules in Mail, and are only prevented from interfering with normal Mail rules by the presence of the Mail Act-On add-on itself. If you ever uninstall the Mail Act-On add-on and forget to disable these rules, then they will be automatically applied to all your incoming mail along with the other rules.

Other than that, Mail Act-On is just a “bundle” file installed inside your “Mail” folder in your home library, so it should not have any impact on the reliability of Mail. A great find!


Comments are closed.

Leave a Reply

Comments are closed.