How can we check the color of a determined pixel(x,y) and, if it is equal to a certain value, run a bash script.
In particular I'd like to write a script that:
I know only how to complete step 3, the first 2 steps are out of my coding skill. Can you help me?
I don't know about the first step, but you could take a screenshot and use ImageMagick to print the colors of pixels.
tmp=/tmp/$(uuidgen).png
trap "rm $tmp" exit
screencapture $tmp
/usr/local/bin/convert $tmp[1x1+1000+500] $tmp[1x1+1100+500]\
$tmp[1x1+1000+510] $tmp[1x1+1100+510] txt: | grep '#FFFFFF' || exit