Page 1 of 1

PIXELSEARCH - Find NOT color

Posted: 30 Mar 2018, 17:40
by joefiesta
Wish: Enhance PIXELSEARCH such that one might specify what color NOT to find.

I'd be happy to explain why I would find this useful. In a nutshell, it would make finding the dimension of a navigation bar in a certain program much, much easier. And, it seems it should be fairly easy to implement while also maintaining backward compatibililty of the PIXELSEARCH command.

Re: PIXELSEARCH - Find NOT color

Posted: 17 Apr 2018, 22:42
by Vh_
joefiesta,

This is really just a quick 'poof'.. but how about using..

Code: Select all

PixelSearch, color, bla bla code
If Error X
Do Y
Else 
Do A

Re: PIXELSEARCH - Find NOT color

Posted: 18 Apr 2018, 17:25
by joefiesta
@vh_: your code doesn't accomplish anything. I'll explain what I what, since you didn't understand:

Suppose you have a gui drawn in a window. It starts at coord (0,0) of the client area. It is of unknown width and height. All the pixels of the gui are color xFFEEDD. Find the location of the rightmost edge of the gui. (And, please don't tell me to use any command to examine the gui. It doesn't have to be a gui. It could be any thing drawn by any program in any manner.)

PixelSearch, searching horizontally, starting at 0,0 looking for NOT COLOR xFFEEDD would give the answer. Yes, I could use a loop and invoke PIXELSEARCH, searching for xFFEEDD each time. Each invocation would have to specify a single pixel location. The loop ends when Pixelsearch fails. That could easily involve invoking Pixelsearch 1000 times, each with different parameters. That's rather absurd programming in my mind.

Re: PIXELSEARCH - Find NOT color

Posted: 21 Jul 2021, 10:09
by SteveMylo
any answers on this? I would love this too