Hello
I’m trying to automate some cleaning in my mailboxes.
I wanted to put a flag on every messages whose background color is green.
I was unable to make a script doing the job.
So I wrote this short one to check the used syntax.
It runs perfectly except that it returns mising value for a message whose background is set to green.
Do you know a workaround ?
-- [SCRIPT]
tell application "Mail"
activate
set theMailBox to mailbox of ((selection as list)'s item 1)
tell theMailBox
set i to 2
set background color of message i to green
set properties_i to (properties of message i)
set bkgcolor to background color of properties_i
end tell -- to mailbox
end tell -- to Mail
-- [/SCRIPT]
(* the report display:
. message size:3452, junk mail status:false, date received:date “samedi 13 janvier 2007 16:38:47”, read status:true, was replied to:false,
background color:missing value,
date sent:date “samedi 13 janvier 2007 16:20:12”, floating:false, .
*)
Yvan KOENIG (from FRANCE dimanche 21 janvier 2007 20:35:36)