Mac 检查屏幕颜色的自动程序

Mac Automator to check screen colors

有没有办法Mac Automator 可以检查某个像素的屏幕颜色?

我用谷歌搜索了这个问题,唯一发现的是使用 applescript 截屏。 (这还不够,因为它每次执行都会给我保存一张照片。:|

谢谢。

此解决方案可能适合您。使用(免费)AppleScript Toolbox scripting addition 中的术语来设置鼠标位置并单击指定坐标...您可以将我刚刚编写的以下代码保存在 AppleScript 编辑器中作为应用程序。

set xyCoordinates to {}

activate
set temp to words of text returned of (display dialog ¬
    "Please Enter Your X And Y Coordinates" default answer ¬
    "250, 250" buttons {"Cancel", "OK"} ¬
    default button 2 ¬
    cancel button 1 ¬
    with title "Get RGB Color Value") as list

repeat with i from 1 to count of temp
    set thisItem to item i of temp
    set end of xyCoordinates to thisItem as integer
end repeat

set theIcon to path to resource "AppIcons.icns" in bundle application "Digital Color Meter"

activate application "Digital Color Meter"
delay 1
AST set mouse point location xyCoordinates
tell application "System Events" to tell process "Digital Color Meter"
    set resultUIElementList to click at xyCoordinates
    delay 1
    keystroke "C" using {shift down, command down}
end tell
delay 1
set colorValue to words of (the clipboard) as list
delay 1

activate
display dialog ("Your RGB Values Are " & return & (item 1 of colorValue) & " " & (item 2 of colorValue) & " " & (item 3 of colorValue)) ¬
    buttons {"OK"} default button "OK" with icon theIcon giving up after 5
quit application "Digital Color Meter"