One thing many switchers from Eudora to Mail miss is the ability to flag,
identify, and categorize messages within a mailbox by using different
colors and associated textual categories. In
Eudora, a labeled message appears in
its mailbox with its text colored and the name of the label entered
in the Label column, as shown in . This
rather handy feature is unfortunately just not part of the Mail
feature set.
Figure 1. Using Eudora's colorful labels to identify and categorize messages within a mailbox
Using simple AppleScripts, it's possible to
duplicate this colorization in Mail—except for the Label
column. That is, this hack allows you to select one or more messages,
perform a menu or key command, and have the message lines change
color as they are listed in a mailbox window. (In Mail, the
background of the message line, rather than the text itself, changes
color.)
Running the Code
Open Mail if it's not already open. From the Scripts
menu (that little icon of a paper scroll between the Window and Help
menus), select Update Scripts Menu to tell Mail to pay attention to
the new scripts you've added.
When you next open the Scripts menu, you'll see the
new Label items listed, along with their Control key shortcuts, as
shown in .
Figure 2. A mail-label script in Mail's Script menu
To label messages, just select them by clicking them as usual
(&command;-click to pick more than one;
&command;-click a selected message to
deselect it) and choose a label command from the Scripts menu or
press the associated Control-key shortcut. shows a message with the orange Reply ASAP
label applied.
Figure 3. A message labeled "Reply ASAP" and colored orange
To strip the label, choose the None label script from the Scripts
menu.
Once your messages are labeled, you can also sort them by color by
using View→Sort By→Color.
—Chris Stone
The Code
Even the newest of newbies should be able to take a quick gander at
this rather simple bit of
AppleScript and understand what it
does. It acts on any messages currently selected in Mail and changes
the background color of each in its turn to orange:
-- Colorize Mail.app messages
using terms from application "Mail"
on perform mail action with messages msgs
tell application "Mail"
repeat with msg in msgs
set background color of msg to orange
end repeat
end tell
end perform mail action with messages
on run
tell application "Mail" to set selectedmsgs to selection
tell me to perform mail action with messages selectedmsgs
end run
end using terms from
Now, here's the interesting part, and
it's not limited to this hack alone.
Save the code to a file named Respond ASAP - Orange__
_ctl-o.scpt; that's three underscore
characters (__ _), mind you. While you could call
the script whatever you like (e.g., simply
ASAP), there's magic in those
last few characters. The ending characters (__
_ctl-o) assign the keyboard shortcut Control-O
(that's the letter O) to the
script so that simply selecting some messages and typing Control-O
calls the script and colorizes the messages.
Save the script in your /Library/Scripts/Mail
Scripts folder. If the Scripts or
Mail Scripts folders do not exist, go ahead and
create them.
Create a similar script for any other of the available colors: blue,
gray, green, orange, purple, red, and yellow. All you need to change
in the script for each is the name of the color. So, making the
following change (as indicated in bold) and saving the script as
/Library/Scripts/Mail Scripts/Reply Some Day_ __ctl-g.scpt
provides a Control-G keystroke to turn messages gray:
set background color of msg to gray
Be sure to create one with the color none for use
in removing a color label.