How to make a highlighted text change color in textedit?

I want Textedit or rather the Applescript to change my marked text in a Textedit document to red, simple as that.

I have come up with this, which does not work:

tell application “TextEdit”
tell document 1
set color of the character selection to {65535, 6196, 10546}
end tell
end tell

I need it to work with Leopard.

Can someone please help me make it work?

Model: Imac with Leopard
Browser: Safari 533.19.4
Operating System: Mac OS X (10.5)

Hi. TextEdit doesn’t support selections, but you can target something else, like a word.

tell application "TextEdit"'s document 1
	set word 2's color to {65535, 6196, 10546}
end

Hi Marc. Thanks, but this produced this error message rather than a red higlighted word:

“AppleScript compile failed with error -2741, message ˜Expected end of line but found unknown token.’ at 40:41”

I managed to make this work, but it did not solve the task. I found another post from Kai here which solves it, but I am puzzled why it takes so much time to run this simple script?

activate application “TextEdit”
tell application “System Events” to tell text area 1 of scroll area 1 of window 1 of process “TextEdit” to if exists then
set {x, y} to value of attribute “AXSelectedTextRange”
if x ≤ y then tell application “TextEdit” to set color of document 1’s characters x thru y to {65535, 6196, 10546}
end if