Jump to content

Recommended Posts

Posted (edited)

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
Posted

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
Posted

PixelSearch is what you are looking for, search the help after it.

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Posted (edited)

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

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
×
×
  • Create New...