|
|
#1 |
|
Guest
Posts: n/a
|
Mail colors / flags
Is there any way to manually apply a color to a message background? I know you can do this using Rules, but can it be done on a case by case basis when I want? I know entourage cam do this with Categories and prjoects, but I really don't want to go back to Entourage, even if it means highlighting the message and running an applescript.
I know the colour of the text can be changed using MailPriority application, but I easily over look these, so having the background of the subject line (like in Rules) would be a far better option. Any ideas? Last edited by ibroughton; 02-17-2005 at 02:08 PM. |
|
|
|
#2 |
|
All Star
Join Date: Jan 2002
Location: sacramento, ca
Posts: 874
|
i know what youre getting at. i'm just trying to remember if this is an option in the tiger preview of mail.app or not. seems like there was all kinds of goodies to look forward to.
in the case of what we have available now, i cant help with the labels. but, i thought i'd point out what you'll probably find painfully obvious--but, you did mention it in the thread title. there are 'flags' that can be applied to messages. cmd-shift-L |
|
|
|
|
|
#3 |
|
MVP
Join Date: Apr 2004
Location: Cumbria, UK
Posts: 2,461
|
It is true that Apple didn't include the means to change colours except in the rules ... but they did include the ability in Mail's Applescript dictionary. Why!!? I dunno.
But here is a script that works. Select all the messages you like, and start the script. There are 8 possible colours (inc. none) to choose from. Obviously, you can only choose one. Error message comes up if you've selected nothing. Code:
property textColours : {"blue", "gray", "green", "none", "orange", "purple", "red", "yellow"}
using terms from application "Mail"
property colours : {blue, gray, green, none, orange, purple, red, yellow}
end using terms from
on run
tell application "Mail"
activate
if (selection is not {}) then
set response to choose from list textColours with prompt "Select a background colour from list" without multiple selections allowed
if (response is not {}) then
set currentTextColours to textColours
set currentColours to colours
repeat until (first item of currentTextColours = (response as string))
set currentTextColours to rest of currentTextColours
set currentColours to rest of currentColours
end repeat
set colourToUse to first item of currentColours
copy selection to messagesToChange
repeat with aMessage in messagesToChange
set background color of aMessage to colourToUse
end repeat
end if
else
beep
display dialog "Cannot apply colour as no messages have been selected." with icon stop
end if
end tell
end run
|
|
|
|
|
|
#4 |
|
All Star
Join Date: Jan 2002
Location: sacramento, ca
Posts: 874
|
nice! thanks for that.
|
|
|
|
|
|
#5 |
|
Major Leaguer
Join Date: Jan 2004
Location: Gulf Shores, Alabama
Posts: 465
|
Here is a method using applescript thanks to Mac OS X Panther Hacks. O'Reilly Press. Authors: Rael Dornfest and James Duncan Davidson.
Here is the Code --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, save the code to a file named something like this. I'll use the example in the book. ASAP-Orange___ctl-o.scpt That's three underscore characters between Orange and ctl. The (___o.scpt) portion of the file name assigns a Keyboard shortcut allowing you to select a message and press Control-O to label that message orange. Save the script in your /Library/Scripts/Mail Scripts folder. You can make scripts for any of the Available colors: blue, gray, green, orange, purple, red, and Yellow. All you need to change in the script is the name of the color. And when saving, change the (___ctl-o.scpt) portion to (___ctl-"First letter of Color".scpt) to match the color you used in the script ex. set background color of msg to gray save as......... Gray___ctl-g.scpt Be sure to create one with the color none to get rid of a color label. Hope that's helpful. |
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Jan 2004
Location: Gulf Shores, Alabama
Posts: 465
|
Whoops
Must of been writing that as bramley was posting. |
|
|
|
|
|
#7 |
|
MVP
Join Date: Apr 2004
Location: Cumbria, UK
Posts: 2,461
|
The odd thing is that the dictionary also claims there is a colour called 'other'.
Code:
Class message: An email message Plural form: messages Elements: bcc recipient cc recipient recipient to recipient header Properties: <Inheritance> item [r/o] -- inherits elements and properties of the item class. all headers plain text [r/o] -- All the headers of the message background color blue/gray/green/none/orange/other/purple/red/yellow -- The background color of the message mailbox mailbox -- The mailbox in which this message is filed content text -- Contents of an email message date received date [r/o] -- The date a message was received date sent date [r/o] -- The date a message was sent deleted status boolean -- Indicates whether the message is deleted or not |
|
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
Just what I've been looking for. Simply changing the color of the text isn't good enough for me as I'm partially color blind, but having the background of the text changed makes it easy to distinguish! Odd that the "Other" selection causes it to crash, but hey, there's enough of a list of colors to be getting on with!
Many thanks! Last edited by ibroughton; 02-18-2005 at 02:30 AM. |
|
![]() |
|
|