need help with pixel search and mouse click

08/27/2013 20:46 sander2828#1
Code:
$enemy1= PixelSearch($hpos[0], $hpos[1],$hpos[0]+$hpos[2],$hpos[1]+$hpos[3], 0xFF0000)
	if IsArray($enemy1) = True then
		MouseMove($enemy1[0],$enemy1[1],0)
		MouseClick("primary",$enemy1[0],$enemy1[1],1,0)
endif
dunno why but it miss click the pixel with about 5 pixels
08/27/2013 22:28 alpines#2
We can't help you if you don't post the full script.
By the way, you can leave the 2 last parameter in Mouseclick because it's already 0.

This may be your error: Why MouseMove and MouseClick? Just use
Code:
MouseClick("left", $enemy1[0], $enemy1[1])
08/27/2013 23:19 sander2828#3
Quote:
Originally Posted by alpines View Post
We can't help you if you don't post the full script.
By the way, you can leave the 2 last parameter in Mouseclick because it's already 0.

This may be your error: Why MouseMove and MouseClick? Just use
Code:
MouseClick("left", $enemy1[0], $enemy1[1])
eaven without mousemove it miss clicked but i will try the code gave
09/05/2013 01:11 yangc10#4
Code:
	If _ImageSearch("Enem.bmp", 1, $x1, $y1, 1) = 1 Then
		MouseClick("Right")
		sleep(500)
        Endif
works just fine.
09/06/2013 19:09 sander2828#5
problem is solved

Quote:
Originally Posted by alpines View Post
We can't help you if you don't post the full script.
By the way, you can leave the 2 last parameter in Mouseclick because it's already 0.

This may be your error: Why MouseMove and MouseClick? Just use
Code:
MouseClick("left", $enemy1[0], $enemy1[1])
no way i can share full script XD