How can I highlight text with changing the background color in Textedit using applescript. I’ve found this script but it only changes the text color, not the background color.
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
Happy xmas!