Jump to content

Clicking on moving object


Gordoni
 Share

Recommended Posts

Hmm

PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] )

Can i get any example for that . Malah is moving so how to set right , top etc . And i need that all?

Edited by Gordoni
Link to comment
Share on other sites

it works ..I tested using the third image in post 1 and selecting a pixel on his head

HotKeySet("{esc}","_end")
  while 1
      $fov=2000
      $shadowMDLS = "0Xfffef6"
  $mPos = MouseGetPos()
          $coords = PixelSearch($mPos[0]-$fov, $mPos[1]-$fov, $mPos[0]+$fov, $mPos[1]+$fov, $shadowMDLS, 1, 1)
      If IsArray($coords) Then
          MouseClick("none", $coords[0], $coords[1] + 2, 2, 1)
          endif
      wend
      
  
  
      func _end()
          Exit
          EndFunc

just change the mouseclick

Edited by bluerein
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...