2

Looking for a way to AppleScript the native (?) OSX Color Picker displayed in Evernote so that I can set a specific color and exit.

Use case: Would like to create scripts to mark selected text red, green, and black. I will use Automator or tool like Fastscripts or Keyboard Maestro to trigger these scripts via hotkeys. My goal is to quickly re-color selected text without having to use the mouse.

  • Cool use case. If you open up Script Editor, does there look to be any dictionaries for hooks when you examine the evernote app? – bmike Sep 11 '15 at 18:23
  • I could not find anything specific to the color picker. – Malcolm Sep 12 '15 at 9:37
0

You can use Keyboard Maestro's mouse actions to find an image on the screen (such as the colour wheel), then a defined pixel coordinate within the found image to click on. This will therefore select the same colour regardless of where the window is located.

  • I was hoping for a nice, clean AppleScript solution (I've googled far and wide) but surprisingly this appears to be the only technique for hacking keyboard color selection in OSX. Thank you. – Malcolm Sep 12 '15 at 9:42
1

This script selects one of my favorite colors from the Color picker group:

tell application "System Events"
    tell process "Evernote"


        click menu item "Show Colors" of menu 1 of menu bar item "Format" of menu bar 1

        click color well 1 of list 1 of list "favorite swatches" of scroll area 1 of splitter group 1 of window 1
        click button 1 of window 1
    end tell
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .