Page 1 of 1
DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 03:57
by frost jack
hello guys , can someone help me with DLL things ? i didnt use ahk since a long time
can u post a script of moving mouse to a position using dll ?
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 05:01
by Scr1pter
Why do you need dll for mouse move?
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 08:47
by frost jack
i want to automate a strategy game but mousemove does not seem to work.
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 09:14
by Flipeador
Try
mouse_event or
SendInput (see this last link for examples).
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 12:23
by frost jack
so many thanks flipador
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 12:28
by frost jack
tried it before , but it keeps moving the mouse every time by %x% unit , i just want to move mouse straight to some x axis and y axis, then move it to another location
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 12:36
by swagfag
show what youve tried, what doesnt work and how it doesnt work. otherwise, people will have to keep guessing, which is rather... wasteful.
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 13:27
by Flipeador
You can try something like this:
Code: Select all
Move(X, Y)
{
DllCall("User32.dll\mouse_event", "UInt", 1, "UInt", -9999, "UInt", -9999, "UInt", 0, "UPtr", 0)
DllCall("User32.dll\mouse_event", "UInt", 1, "UInt", X, "UInt", Y, "UInt", 0, "UPtr", 0)
}
MsgBox % Move(100, 50)
MsgBox % Move(100, 50)
MsgBox % Move(500, 350)
MsgBox % Move(500, 350)
MsgBox % Move(750, 500)
MsgBox % Move(750, 500)
Re: DLL Related - MouseMove [GAME]
Posted: 11 Aug 2018, 17:56
by frost jack
Thank you , ill try it
Re: DLL Related - MouseMove [GAME]
Posted: 12 Jan 2023, 11:41
by LAPIII
@Flipeador I like your script, but it rendered this error: Call to nonexistent function. Could you please help me?