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.
PIXELSEARCH - Find NOT color
Re: PIXELSEARCH - Find NOT color
joefiesta,
This is really just a quick 'poof'.. but how about using..
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
@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.
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
any answers on this? I would love this too
Who is online
Users browsing this forum: No registered users and 33 guests