• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: color and Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: color and Mail


  • Subject: Re: color and Mail
  • From: "koenig.yvan" <email@hidden>
  • Date: Wed, 15 Jan 2014 11:19:35 +0100


Le 15/01/2014 à 00:40, Christopher Stone <email@hidden> a écrit :

On Jan 14, 2014, at 07:57, koenig.yvan <email@hidden> wrote:
Is there a way to remove (set it to none) the background color applied to messages (mails) descriptors thru the button [Colors]
______________________________________________________________________

Hey Yvan,

# This works:
tell application "Mail"
set mList to (get selection)
repeat with i in mList
set background color of i to none
end repeat
end tell

# none
# blue
# gray
# green
# orange
# purple
# red
# yellow


# This fails:
tell application "Mail"
set background color of (messages of inbox) to red
end tell

--
Best Regards,
Chris

Thanks Christopher

You opened the door. There is no need to select the items.

tell application "Mail"
set mList to every message of mailbox "Batiactu/maison a part"
set origColors to {}
repeat with i in mList
set end of origColors to (get background color of i)
set background color of i to none
end repeat
end tell
origColors

Did the trick although the mailbox wasn't the displayed one.
It's just puzzling to see that origColors was reported as :
{none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none, none}

When 15 descriptors had a red background.

So I must do the job by hand because my goal was to remove backgrounds except the red ones.

Yvan KOENIG (VALLAURIS, France) mercredi 15 janvier 2014 11:19:14



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >color and Mail (From: "koenig.yvan" <email@hidden>)
 >Re: color and Mail (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: color and Mail
  • Next by Date: Re: Trim folder names
  • Previous by thread: Re: color and Mail
  • Next by thread: Problem with DELAY
  • Index(es):
    • Date
    • Thread