will88 Posted April 15, 2009 Share Posted April 15, 2009 I have been using PixelSearch for a long time(almost in every script I make), and this is the first time I've ever had a problem with it.There are 2 rocks in this picture, one black and on grey. It's almost like it thinks, that there both the same color(clicks both of them). I have retaken the color of the rock several times, but it still clicks both types of rocks.$Coords=PixelSearch(3,25,508,363,$rock) If Not @error Then $x = $Coords[0] $y = $Coords[1] $Speed = Random(2,10) MouseClick("left",$x,$y,1,$Speed) EndIf Password-Keeper Link to comment Share on other sites More sharing options...
BinaryBrother Posted April 15, 2009 Share Posted April 15, 2009 The Shade-variations are coinciding... In other words... The color is found in BOTH rocks... Try something like this...Dim $Colors[3] $Colors[1] = "Color1 in rock 1" $Colors[2] = "Color2 in rock 1" $Colors[3] = "Color3 in rock 1" $Coords = PixelSearch(3,25,508,363,$Colors[1]) If Not @Error Then $Coords = PixelSearch(3,25,508,363,$Colors[2]) If Not @Error Then $Coords = PixelSearch(3,25,508,363,$Colors[3]) If Not @Error Then $x = $Coords[0] $y = $Coords[1] $Speed = Random(2,10) MouseClick("left",$x,$y,1,$Speed) EndIf EndIf EndIf SIGNATURE_0X800007D NOT FOUND Link to comment Share on other sites More sharing options...
rebelcitymogo Posted April 15, 2009 Share Posted April 15, 2009 theres another problem with pixel functionality Wen i use get pixel colour on another application on screen the functioon returns blue for red colour and red for blue colour ,,and hence all the other colours which are formed from RGB..its messed up. I dont know if its a bug or mistake on my side plz comment Link to comment Share on other sites More sharing options...
will88 Posted April 15, 2009 Author Share Posted April 15, 2009 The Shade-variations are coinciding... In other words... The color is found in BOTH rocks... Try something like this... Dim $Colors[3] $Colors[1] = "Color1 in rock 1" $Colors[2] = "Color2 in rock 1" $Colors[3] = "Color3 in rock 1" $Coords = PixelSearch(3,25,508,363,$Colors[1]) If Not @Error Then $Coords = PixelSearch(3,25,508,363,$Colors[2]) If Not @Error Then $Coords = PixelSearch(3,25,508,363,$Colors[3]) If Not @Error Then $x = $Coords[0] $y = $Coords[1] $Speed = Random(2,10) MouseClick("left",$x,$y,1,$Speed) EndIf EndIf EndIf Thanks, but that didn't seem to work. Password-Keeper Link to comment Share on other sites More sharing options...
will88 Posted April 16, 2009 Author Share Posted April 16, 2009 Bump - Any idea's on how to avoid clicking the gray rock? Password-Keeper Link to comment Share on other sites More sharing options...
andybiochem Posted April 16, 2009 Share Posted April 16, 2009 Try: $Coords=PixelSearch(3,25,508,363,0x101010) If Not @error Then $x = $Coords[0] $y = $Coords[1] $Speed = Random(2,10) MouseClick("left",$x,$y,1,$Speed) EndIf If the image that you posted above is an exact match to the target image, then 0x101010 only exists in the darker rock. - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now