Page 1 of 1

A code to press j when the pixels on the screen change.

Posted: 21 Mar 2021, 13:15
by Luciquad
A code to press j when the pixels on the screen change.
If I move my mouse around, the pixels will change and press the j key automatically. (Continuous)

Re: A code to press j when the pixels on the screen change.

Posted: 21 Mar 2021, 13:56
by boiler
Do you mean you want it to press j when any pixel on the screen changes, or when certain pixels in certain locations change? It makes a big difference in how it would be done.

Re: A code to press j when the pixels on the screen change.

Posted: 14 Apr 2021, 16:07
by Luciquad
boiler wrote:
21 Mar 2021, 13:56
Do you mean you want it to press j when any pixel on the screen changes, or when certain pixels in certain locations change? It makes a big difference in how it would be done.
yes

Re: A code to press j when the pixels on the screen change.

Posted: 14 Apr 2021, 16:20
by boiler
You can capture the entire screen or window of interest using something like the one found on this page (there are others), then use ImageSearch to search for that entire image. Keep looping as long as it finds it until it can't find it. When it can no longer find it, it indicates that a pixel has changed.