GetPixelColor from haystack, is it possible?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
NickD
Pro Scripter
Posts: 58
Joined: Fri Sep 23, 2016 2:17 pm

GetPixelColor from haystack, is it possible?

Post by NickD » Sun Oct 30, 2016 9:17 am

I want to write a script that reacts to cursor color changes, so I plan to use Irfanview to capture a screenshot with cursor, then I would like to be able to use GetPixelColor to grab the cursors pixel color at %x%,%y%.

1. Is this possible?
2. If it is, how do I make GetPixelColor check the Irfanview screenshot rather than the clipboard haystack?
3. Could I use something like:

GetCursorPos>x,y
Let>cursorx=%x%+5
Let>cursory=%y%+5
GetPixelColor>cursorx,cursory

To grab the cursors color regardless of position by specifying an offset from current mouse coords?

NickD
Pro Scripter
Posts: 58
Joined: Fri Sep 23, 2016 2:17 pm

Re: GetPixelColor from haystack, is it possible?

Post by NickD » Tue Nov 01, 2016 7:51 am

I figured this out thanks.

User avatar
JRL
Automation Wizard
Posts: 3531
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: GetPixelColor from haystack, is it possible?

Post by JRL » Tue Nov 01, 2016 1:43 pm

So... how about a hint as to what you've done to make this work. Future generations of Macro Scheduler users may want to know.

Wait... I see you posted it HERE.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts