Re: Set color of body text in Mail
Re: Set color of body text in Mail
- Subject: Re: Set color of body text in Mail
- From: Iurista GmbH <email@hidden>
- Date: Sat, 14 Jan 2012 20:23:34 +0100
Am 14.01.2012 um 17.25 schrieb Michael Tompsett:
> I am trying to change the color and bold a line of text in an email generated by an applescript.
>
> So far i can manage to bold the text, but changing the color does not seem to work (although it doesn't error).
>
> In the example below, the second line of text in the email should be bold and red. At the moment it just bolds up, but nothing more.
>
> Any ideas?
>
>
> set thebody to "Line 1 should beplain and black
> line 2 should be bold and red
> line 3 should be plain and black
> "
> tell application "Mail"
> set theMessage to make new outgoing message with properties {visible:true, subject:"test", content:thebody}
> tell content of theMessage
> set properties of paragraph 2 to {font:"Helvetica-Bold", color:{255, 0, 0}}
> end tell
> end tell
try that coding. It works with my SnoLeo
property Sandy : {44461, 39064, 30583}
property Sandy1 : {48830, 44461, 36237}
property Sandy2 : {53456, 48573, 39064}
property sahara : {40115, 25444, 12885}
set thebody to "Line 1 should beplain and black
line 2 should be bold and red
line 3 should be plain and black
"
tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:"test", content:thebody}
tell content of theMessage
set properties of paragraph 2 to {font:"Helvetica-Bold", color:sahara}
end tell
end tell
Rudolf
--
The price of freedom is eternal vigilance (Thomas Jefferson, US President)
This mail is from:
Rudolf O. Durrer
IURISTA CONSULT GmbH
Legal Counselors
Switzerland
email@hidden
email@hidden
_______________________________________________
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