I am looking for a way to hotkey a change in color of highlighted text across a broad range of applications on OS X 10.9.

This could be:

  • a small app that acts on selected text (something like Liquid)
  • an applescript or other programmatic solution; this can be hotkeyed using the utility Keymando
  • anything else

I don't know about other applications, but you could use a script like this with TextEdit:

tell application "System Events" to tell process "TextEdit"
    set {x, y} to value of attribute "AXSelectedTextRange" of text area 1 of scroll area 1 of window 1
end tell
tell application "TextEdit"
    set color of characters x thru y of document 1 to {65535, 0, 0}
end tell
  • Thanks Lri. I think I won't have a problem creating individual scripts for many different applications, but I'm looking specifically for something that can be used across all applications-- like a Service or something. Any idea on how to adapt this? – Sean Mackesey Nov 22 '13 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.