App to apply color to text across apps in OS X

0

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

Sean Mackesey

Posted 2013-11-22T05:56:04.243

Reputation: 405

Answers

0

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

Lri

Posted 2013-11-22T05:56:04.243

Reputation: 34 501

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 – 2013-11-22T23:27:15.333