Hello Guys Question About Pixel Search

12/11/2011 16:43 keroneo#1
Hello Everybody I Have A Question About Pixel Search

Can I Do With Autoit Multi Pixel Search I Mean When The Bot Can't Find A Color It Will Change To Another For Example I Want To Make Bot That Hit All The Red And Blue Balls How Can I Do that With Autoit ? All I Know Is How To Do It With one Color

Can I Make It With Mulit Colors ?

I Hope Your Understand What Iam Saying

Thanks
12/11/2011 19:33 MoepMeep#2
[Only registered and activated users can see links. Click Here To Register...]
12/12/2011 19:54 GoDJGo#3
I think, its pretty simple!

Use it like so:
While 1
$Variable = PixelSearch (171, 321, 758, 697, 0xFF3300)
If IsArray ($Variable) = True Then
MouseMove ($Variable [0], $Variable [1],1)
MouseClick ("left")
EndIf
WEnd
While 2
$Variable = PixelSearch (171, 321, 758, 697, 0xFF3300)
If IsArray ($Variable) = True Then
MouseMove ($Variable [0], $Variable [1],1)
MouseClick ("left")
EndIf
WEnd

.....
12/13/2011 13:59 Imaginär#4
Quote:
Originally Posted by GoDJGo View Post
I think, its pretty simple!

Use it like so:
Code:
While 1
	$Variable = PixelSearch (171, 321, 758, 697, 0xFF3300)
	If IsArray ($Variable) = True Then
		MouseMove ($Variable [0], $Variable [1],1)
		MouseClick ("left")
	EndIf
WEnd
While 2
	$Variable = PixelSearch (171, 321, 758, 697, 0xFF3300)
	If IsArray ($Variable) = True Then
		MouseMove ($Variable [0], $Variable [1],1)
		MouseClick ("left")
	EndIf
WEnd
.....
2 While-loops? No.

I guess it has to look liks this:

Code:
While 1
	
	$pixel1 = PixelSearch(...
	If not @error Then
		;blabla
	Else
		$pixel2 = PixelSearch(...
		If not @error Then
			;blabla2
		EndIf
	EndIf
	
WEnd
Untested tho :f
12/14/2011 14:39 derpo#5
PixelSearch is very slow.

If you want to check multi colors, create an array which includes the colors and check the pixels in a for-loop of the array.