Code: Select all
DllCall("mouse_event", uint, 1, int, 1200, int, 0)
Here is my code for mouse event, and here is my full code if you are interested. I have tried calling another mouse event right before the one I want working so it thinks the mouse has moved, but it doesn't seem to be working. Any help would be appreciated!
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Numpad2::
Send {Click, down}
Loop
{
Loop, 25
{
Send {w down}
Sleep, 20500
Send {w up}
Send {a down}
Sleep, 20500
Send {a up}
}
Sleep, 1000
DllCall("mouse_event", uint, 1, int, 1200, int, 0)
Loop, 25
{
Send {a down}
Sleep, 20500
Send {a up}
Send {w down}
Sleep, 20500
Send {w up}
}
sleep, 1000
DllCall("mouse_event", uint, 1, int, 1200, int, 0)
}
return
[Mod edit: Changed codebox tags from .txt format to default .ahk format]