应用程序在OS X中跨应用程序的文本应用颜色


0

我正在寻找一种方法来改变OS X 10.9上各种应用程序中突出显示文本颜色的变化。

这可能是:

  • 一个小应用程序,作用于选定的文本(像液体
  • 一个AppleScript或其他程序化解决方案; 这可以使用实用程序Keymando进行热键
  • 还要别的吗

Answers:


0

我不知道其他应用程序,但您可以使用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。我认为为许多不同的应用程序创建单独的脚本不会有问题,但我正在寻找可以在所有应用程序中使用的东西 - 比如服务或其他东西。关于如何适应这个的任何想法?
Sean Mackesey 2013年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.