Jump to content

mousemove?


 Share

Recommended Posts

im looking for some help with this code

while 1

If (0xFFFFFF = PixelGetColor(334, 146))  Then 
 ;mouse moves to color
    exitloop 
    EndIf
 
 wend

when the color is found i want the mouse to move to that color and also i want the pixelgetcolor to search the whole screen

thx much

Edited by tech2
Link to comment
Share on other sites

Well you just found the co-ordinates with PixelGetColor() - X:334 Y:146. So if there is a match then:

While 1
    If (0xFFFFFF = PixelGetColor(334, 146)) Then
        MouseMove(334, 146)
        ExitLoop
    EndIf
WEnd
yes but im wanting the the pixelgetcolor to check the whole screen not jus those corodinates the move the mouse to the color thx for the replys so far
Link to comment
Share on other sites

you can do like this

$left=0
$top=0
$right=1279
$bottom=1023
while 1
$search=pixelsearch ($left,$top,$right,$bottom,0xFFFFFF,1,1)
if not @error then mouseclick ("left",$search[0],$search[1],1,10)
sleep (20)
wend
Edited by TheOnlyOne
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...