i currently have a script that moves the mouse smoothly left and right with leftarrow and rightarrow when shift is being held down.
though i need the mouse to go left and right with a/d while maintaining the original input (so if i hold down shift+d it holds d and moves the cursor to the right)
now one thing that is crucial is that it moves the mouse smoothly (feel free to try it out for yourself) since if i use steps the mouse seems to stutter a bit.
does anyone know how i can achieve this?
thank you in advance.
Code: Select all
#Warn
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance Force ; Ensures only one instance of the script is running.
SetBatchLines, -1 ; Sets the script's processing priority to the highest level.
+left::MouseMover("Left")
+Right::MouseMover("Right")
;EOAES
MouseMover(Key){
Speed := 1
Directions := { Left:Func("DllCaller").Bind(-Speed,0)
, Right:Func("DllCaller").Bind(Speed,0)}
While (GetKeyState(Key, "P") = 1)
Directions[Key]()
}
DllCaller(X := 0, Y := 0){
Return DllCall("mouse_event", "UInt", 0x0001, "Int", X, "Int", Y, "UInt", 0, "UPtr", 0)
}