Just wondering if there was some way to get the RGB value for a specific point on the screen using Applescript. I'm doing some (flash) game automating and sampling the color means I can check if the correct dialog has appeared before clicking.
I've googled around and found a couple of close hits, but no solutions:
- This post has the same idea as above, from 2006 and no solution
- This will get an RGB value from an image.
As the first link, I'd like to do:
If there exists no solution, could someone point me in a direction where I can take selection screen shots (like command-shift-4) with AS or from the shell and I can use the 2nd link above to grab the RGB value. I know I can take full screen screenshots, but that would be unwieldy if I were to sample the screen several times a second.
Thanks in advance for any help rendered,
Sammich.
I've googled around and found a couple of close hits, but no solutions:
- This post has the same idea as above, from 2006 and no solution
- This will get an RGB value from an image.
As the first link, I'd like to do:
Code:
if coloratpixel(x, y) is equal to {r, g, b} then
click(x, y)
end
If there exists no solution, could someone point me in a direction where I can take selection screen shots (like command-shift-4) with AS or from the shell and I can use the 2nd link above to grab the RGB value. I know I can take full screen screenshots, but that would be unwieldy if I were to sample the screen several times a second.
Thanks in advance for any help rendered,
Sammich.