Jump to content

WIN API mouse move


 Share

Recommended Posts

Well guys ive noticed a few people asking for win api mouse move so I wrote this quick func to make it easier for people. I understand that some applications will not allow autoit to use the origonal autoit function so incases like that this should work. Good luck

#Include <WinAPI.au3>
#include <Constants.au3>


Func _WinAPI_MOUSEMOVE($X,$Y)  ; X coordinate & Y coordinate
$aArray=MouseGetPos()  ; gets the mouse position
_WinAPI_Mouse_Event($MOUSEEVENTF_MOVE,$X-$aArray[0],$Y-$aArray[1],0,0)  ; subtract X coordinate & Y coordinate from mouse current pos and move mouse
EndFunc
Edited by Insomniac420
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...