Jump to content
Sign in to follow this  

WIN API mouse move

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
Edited by Insomniac420

Share this post

Link to post
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
Sign in to follow this  

  • Create New...