Get Pixel from window and click if that pixel (or in range of that pixels) exists.
Hello VB Forums!
I'm trying to accomplish a new project for myself which is giving me headaches.
So, I want to:
- Get/Focus a window (done)
- Detect pixel (done)
- Mouse inputs (done)
- Now the fun part, I want to check if Pixels eg. (55, 80, 120) are found in that window, click it, also, if other pixels are relative to (55, 80, 120) click it also.
Thanks, hope someone could help me. :)
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
Google VB.Net MouseEvent API
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
Are those colors that you are wanting to click on? 55, 80, 120 looks like an RGB color. If it's a color, what does relative mean? It's fairly unlikely that there's just ONE pixel of a certain color, and you likely don't want to be clicking on a second pixel that is adjacent to the first.
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
Quote:
Originally Posted by
Shaggy Hiker
Are those colors that you are wanting to click on? 55, 80, 120 looks like an RGB color. If it's a color, what does relative mean? It's fairly unlikely that there's just ONE pixel of a certain color, and you likely don't want to be clicking on a second pixel that is adjacent to the first.
I think the OP wants to keep clicking at random points within a region defined by a color. I’ve seen these type of questions before, where the OP thinks clicking at different points will appear more of a human interaction with the app.
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
Quote:
Originally Posted by
Shaggy Hiker
Are those colors that you are wanting to click on? 55, 80, 120 looks like an RGB color. If it's a color, what does relative mean? It's fairly unlikely that there's just ONE pixel of a certain color, and you likely don't want to be clicking on a second pixel that is adjacent to the first.
Yes, that's a RGB color, if pixels are relative >> should be like ± eg. 10, so be like this <=> 55, 80, 120
Eg. -1: >> 54, 79, 119
+1: >> 56, 81, 121
Up to N value or tolerance or how do you want to call it...
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
That's a pretty ambitious goal. Colors are vague and images are large, so this type of thing is usually a pretty bad idea. What are you hoping to achieve with it?
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
Quote:
Originally Posted by
Shaggy Hiker
That's a pretty ambitious goal. Colors are vague and images are large, so this type of thing is usually a pretty bad idea. What are you hoping to achieve with it?
I'd like to make a bot... Would you suggest me anything else?
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
Quote:
Originally Posted by
piticu97
Hello VB Forums!
I'm trying to accomplish a new project for myself which is giving me headaches.
So, I want to:
- Get/Focus a window (done)
- Detect pixel (done)
- Mouse inputs (done)
- Now the fun part, I want to check if Pixels eg. (55, 80, 120) are found in that window, click it, also, if other pixels are relative to (55, 80, 120) click it also.
Thanks, hope someone could help me. :)
Quote:
Detect pixel (done)
So what's the problem???
Re: Get Pixel from window and click if that pixel (or in range of that pixels) exists
As Shaggy Hiker told you... It's unlikely you'll find a block of rgb(55, 80, 120) colored pixels. Actual colors are vague.