Jump to content
Sign in to follow this  
brad25

pixel search

Recommended Posts

brad25

i wrote some code to find a certain color and then move the mouse to that color now im trying to figure out how i can make the mouse move about 30 pixels to the right once it moves the mouse to the color. so when it finds the color it moves the mouse to the color then moves the mouse 30 pixels to the right can this even be done?

Share this post


Link to post
Share on other sites
brad25

$lct = PixelSearch( 0, 161, 1010, 750, 0x98612e)

If Not @error Then 
    
MouseMove ( $lct[0], $lct[1])
         
         EndIf

theres my code what do i put for the x and y? i just want it to move 30 pixels to the right of that color when its found

Share this post


Link to post
Share on other sites
JohnOne

$lct = PixelSearch(0,161,1010,750,0x98612e)  
If Not @error Then       
MouseMove ($lct[0],$lct[1])           
EndIf  
MouseMove ( $lct[0]+30, $lct[1])

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
brad25

works ty john

Share this post


Link to post
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
Sign in to follow this  

×