DllCall not working with Send

Ask gaming related questions (AHK v1.1 and older)
AA 33
Posts: 1
Joined: 14 Aug 2022, 16:39

DllCall not working with Send

Post by AA 33 » 14 Aug 2022, 16:51

When I use DllCall for a mouse movement event after the Send command, the mouse doesn't move. If I use DllCall before the Send command, it only works if I manually move my mouse before each time I run the script.
The MouseMove command does not work in the game I am making the script for.
I've tried using SendMode before "Send e" and it doesn't help.


Here is a simple section of code that demonstrates the problem:

Code: Select all

v::
Send e
Sleep 200
Send e
Sleep 200
DllCall("mouse_event", int, 1, int, 402, int, 0)
Return
[Mod edit: [code][/code] tags added.]

User avatar
mikeyww
Posts: 26600
Joined: 09 Sep 2014, 18:38

Re: DllCall not working with Send

Post by mikeyww » 16 Aug 2022, 18:40

Welcome to this AutoHotkey forum!

Here are some tips for games in case helpful: viewtopic.php?f=7&t=11084

Post Reply

Return to “Gaming Help (v1)”