Re: Re: Set color of body text in Mail (Iurista GmbH)
Re: Re: Set color of body text in Mail (Iurista GmbH)
- Subject: Re: Re: Set color of body text in Mail (Iurista GmbH)
- From: Michael Tompsett <email@hidden>
- Date: Sat, 14 Jan 2012 21:56:04 +0100
Fantastic, thank you Rudolf, that works a treat.
You're correct about using RED as the property name, doesn't work, but it also doesn't seem to work with any of the standard colours, like BLUE or YELLOW - i guess these are reserved terms?
On 14 Jan 2012, at 21:00, email@hidden wrote:
> Send AppleScript-Users mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.apple.com/mailman/listinfo/applescript-users
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AppleScript-Users digest..."
>
>
> Today's Topics:
>
> 1. Re: Set color of body text in Mail (Iurista GmbH)
> 2. Re: Set color of body text in Mail (Iurista GmbH)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 14 Jan 2012 20:23:34 +0100
> From: Iurista GmbH <email@hidden>
> Subject: Re: Set color of body text in Mail
> To: Applescript Users <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
>
> 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
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 14 Jan 2012 20:38:33 +0100
> From: Iurista GmbH <email@hidden>
> Subject: Re: Set color of body text in Mail
> To: Applescript Users <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
>
> 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
>
>
> Addendum
> I forgot,that you wanted red.
> Now this is a strange thing:
>
> property red : {65535, 2427, 2427}
> property rot : {65535, 2427, 2427}--German word for red
>
> Your scripts works (always SnoLeo) when taking "rot", but not with "red"
>
> I have any clue why this is so
> Rudolf
>
>
>
> ------------------------------
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden
> http://lists.apple.com/mailman/listinfo/applescript-users
>
> End of AppleScript-Users Digest, Vol 9, Issue 15
> ************************************************
_______________________________________________
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