Skip to content

Instantly share code, notes, and snippets.

@amio
Last active December 12, 2015 03:29
Show Gist options
  • Save amio/4707695 to your computer and use it in GitHub Desktop.
Save amio/4707695 to your computer and use it in GitHub Desktop.
Color Picker using DigitalColor Meter
-- Color Picker using DigitalColor Meter
-- Checks to see if System Preferences > Universal Access > Enable access for assistive devices is checked
-- This option is required for "System Events" to use the keystroke and key code commands.
-- If it is not checked, your password is required to make the change
tell application "DigitalColor Meter" to activate
tell application "System Events"
tell process "DigitalColor Meter"
set visible to false
click menu item "Copy Color as Text" of menu 1 of menu bar item "Color" of menu bar 1
end tell
end tell
tell application "DigitalColor Meter" to quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment