Jump to content

Mouse Move Pixel by Pixel?


Jmoore3274
 Share

Recommended Posts

I have been trying to figure out how to make the mouse move pixel by pixel. For example, I would like the script to look for a certain color, move the mouse to it then move a specified number of pixels X then a number of pixels Y. Example Script is below.

WinMove( "Window", "", 0,0 ) 

While 1
$Coord = PixelSearch( 778, 179, 801, 409, 0xA9A907, 10 )
   If @Error = 0 Then
      MouseMove( $coord )
      Sleep( 200 )
          MouseMove( A number of pixels X )
          Sleep( 200 )
          MouseMove( A Number of Pixels Y )
          Sleep( 200 )
          MouseClick( "Left" )
   EndIf
          Sleep( 50000 )
Wend

Sorry if my scripting is wrong. Im still new at this.

Thanks in advance

Edited by Jmoore3274
Link to comment
Share on other sites

I have been trying to figure out how to make the mouse move pixel by pixel. For example, I would like the script to look for a certain color, move the mouse to it then move a specified number of pixels X then a number of pixels Y. Example Script is below.

WinMove( "Window", "", 0,0 ) 

While 1
$Coord = PixelSearch( 778, 179, 801, 409, 0xA9A907, 10 )
   If @Error = 0 Then
      MouseMove($Coord[0], $Coord[1])
      Sleep( 200 )

          $Coord[0] = $Coord[0] + 50          ; Moves 50 pixels to the right of original x coordinate
          MouseMove($Coord[0], $Coord[1], 0)
          Sleep( 200 )

          $Coord[1] = $Coord[1] + 25          ; Moves 25 pixels up from 50 pixels to the right of the original coordinate
          MouseMove($Coord[0], $Coord[1])
          Sleep( 200 )

          MouseClick( "Left" )
   EndIf
          Sleep( 50000 )
Wend

Sorry if my scripting is wrong. Im still new at this.

Thanks in advance

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...