> Pixelsearch problem

06/06/2012 16:38 Ratsmitglied#1
guten tag und danke im vorraus

Problem
pixelsearch klickt unerwünschte pixel/farbe an (obwohl die PixelID nicht übereinstimmt)

€nglish
Pixelsearch is clicking random pixels,even if the PixelID is wrong

Code:
Func Start() ;^^


$pxt = 0xff6969
$x1 = 379
$y1 = 234
$x2 = 1603
$y2 = 943
While 1
    $pxt = PixelSearch($x1, $y1, $x2, $y2,$pxt, 0)
	If Not @error Then
   mousemove($pxt[0],$pxt[1])
   mouseclick("left")
      Sleep ( 2000 )
Endif    
WEnd
EndFunc
06/06/2012 16:49 Freddy​#2
So?
PHP Code:
Start()
Func Start()
Local $pxt 0xff6969$x1 379$y1 234$x2 1603$y2 943
While 1
   $sPX 
PixelSearch($x1$y1$x2$y2,$pxt0)
   If 
IsArray($sPXThen
      MouseMove
($sPX[0],$sPX[1])
      
MouseClick("left")
      
Sleep(2000)
   Endif    
WEnd
EndFunc 
06/06/2012 16:57 Ratsmitglied#3
Quote:
Originally Posted by Freddy​ View Post
So?
PHP Code:
Start()
Func Start()
Local $pxt 0xff6969$x1 379$y1 234$x2 1603$y2 943
While 1
   $sPX 
PixelSearch($x1$y1$x2$y2,$pxt0)
   If 
IsArray($sPXThen
      MouseMove
($sPX[0],$sPX[1])
      
MouseClick("left")
      
Sleep(2000)
   Endif    
WEnd
EndFunc 
$pxt^^
but..if i correct it,same problem
06/06/2012 23:28 Lawliet#4
Try "if PixelGetColor() = $pxt then"
06/06/2012 23:43 Ratsmitglied#5
Quote:
Originally Posted by Lawliet! View Post
Try "if PixelGetColor() = $pxt then"
where i have to add this?