Jump to content

pixelsearch not clicking wierd behavior


 Share

Recommended Posts

sometimes my script just hovering  mouseMove to the target continuously.. and not left clicking it ..whats the problem? :(


 

Func Start()
While 1
   $pxs2 = PixelSearch(70, 102, 1181, 654, 0x6b2900)
If isArray($pxs2) then
MouseMove($pxs2[0]+40,$pxs2[1]+40, 0)
sleep(100)
MouseClick("Left")
Else
      $pxs3 = PixelSearch(70, 102, 1181, 654, 0x6b29a4)
If isArray($pxs3) then
MouseMove($pxs3[0]+40,$pxs3[1]+40, 0)
sleep(100)
MouseClick("Left")
Else
         $pink = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x8a0859)
If isArray($pink) then
MouseMove($pink[0],$pink[1], 0)
sleep(100)
MouseClick("Left")
Else
            $pink2 = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x8c085a)
If isArray($pink2) then
MouseMove($pink2[0],$pink2[1], 0)
sleep(100)
MouseClick("Left")
Else
    $pink3 = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x880852)
If isArray($pink3) then
MouseMove($pink3[0],$pink3[1], 0)
sleep(100)
MouseClick("Left")
Else
    $green = PixelSearch(70, 102, 1181, 654, 0x00FF00)
If isArray($green) then
Send("{F3}")
MouseMove($green[0]+25,$green[1]+25, 0)
sleep(100)
MouseClick("Left")


Else
   Send("{F9}")
   Sleep(700)
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
WEnd
EndFunc

 

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