I was recently having a look at the pywin32 module and found a multitude of approaches on how to find the color of a pixel given its coordinates, but was wondering if there was a way to find the coordinate of a pixel given its particular color, either as an rgb tuple or hex vlaue.
any help is greatly appreciated
What I meant is how would one generate a list of coordinates of pixels of a particular color. The end effect I'm trying to achieve is to have the program be able to find the location of a particular color on screen, and then clicking on it. The clicking etc I understand how to do, yet the only method I know of finding the location of a colour would be to take a screenshot of the pixel at (0,0), check if it's colour matches the one I have predetermined, and then iterate across and down the screen with a loop function or something, which is massively slow.
Thanks for your help:)
cheers for all the helps guys, got it working by using PIL, it now takes a screenshot and checks for pixels in a color range, saving the coordinates and then clicking on them later:) thanks again for your assisstance!
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...