I have a question, is it possible to write a command so that the application searches the screen for a certain color and clicks or right clicks on where that color was found? Edit:this is for VB.net, sorry.
Clicking on a certain color
Collapse
X
-
Originally posted by MaffyxI have a question, is it possible to write a command so that the application searches the screen for a certain color and clicks or right clicks on where that color was found? Edit:this is for VB.net, sorry.
Nathan -
Hmm if you could get a Graphics object that contained the whole screen.
Actually, I thinjk you can. I seem to recall immitating the PrintScreen effect in a program once.
Once you have the whole screen Graphics, you can make a bitmap of it.
Then search the pixels of the bitmap for the Color you are looking for.
Then it gets tricky but you need to like create an instance of the Message object that contains the like WM_LeftClick id along with values for (x,y) coordinates.
Start by looking up how to get the "screen image" data or something and maybe that will help?Comment
-
Originally posted by PlaterHmm if you could get a Graphics object that contained the whole screen.
Actually, I thinjk you can. I seem to recall immitating the PrintScreen effect in a program once.
Once you have the whole screen Graphics, you can make a bitmap of it.
Then search the pixels of the bitmap for the Color you are looking for.
Then it gets tricky but you need to like create an instance of the Message object that contains the like WM_LeftClick id along with values for (x,y) coordinates.
Start by looking up how to get the "screen image" data or something and maybe that will help?Comment
-
The color? That depends.
(Unless there's something better to use in like directx/gdfx libraries)
Assuming worst case, you would have the Height x Width number of pixels to examine from your graphics.
If you could hint at where to start looking it would probably help.
It may also help to divide the image up into sections and have it scan in seperate threads?Comment
-
Originally posted by PlaterThe color? That depends.
(Unless there's something better to use in like directx/gdfx libraries)
Assuming worst case, you would have the Height x Width number of pixels to examine from your graphics.
If you could hint at where to start looking it would probably help.
It may also help to divide the image up into sections and have it scan in seperate threads?Comment
Comment