Jump to content

how to pixelsearch click in middle area?


 Share

Recommended Posts

my script is working fine but it mostly clicks only in the sides and corner of green square (which is the first pixels it detects i guess) any idea how can I click the middle area inside of pixelsearch? heres what i done but it wont work 

$greenbox = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x00FF00)
If isArray($greenbox) then
newX := greenbox[0] + 25
newY := greenbox[1] + 25
MouseMove($newX[0],$newY[1], 0)
MouseClick("Left")

click.jpg

Link to comment
Share on other sites

my script is working fine but it mostly clicks only in the sides and corner of green square (which is the first pixels it detects i guess) any idea how can I click the middle area inside of pixelsearch? heres what i done but it wont work 

$greenbox = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x00FF00)
If isArray($greenbox) then
MouseMove($greenbox[0]+25,$greenbox[1]+25, 0)
MouseClick("Left") 

 

click.jpg

You were close :) 

 

:= doesn't assign. use = or +=

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

×
×
  • Create New...