A few things:
I am no AHK god, there are a lot of people that know waaaaaaaaaaaaaaayyyy more than I do about AHK lol, but thanks for the compliment.
This work fine on my end, you just had the HotKey wrong, it should look like this
not this
Code: Select all
~LButton::
While, GetKeyState("LButton", "P")
{ mouseXY(0,7)
sleep 1
mouseXY(0,4)
sleep 1
mouseXY(0,-1)
sleep 5
mouseXY(-1,0) ; go left
sleep 5
mouseXY(1,0) ; go left
sleep 5
mouseXY(x,y)
{ DllCall("mouse_event",int,1,int,x,int,y,uint,0,uint,0)
}
} Return
Also, look out for stuff like this:
Code: Select all
mouseXY (-1,0); go left ;<<< You need to have one space between the ) and ; or the script will not work correctly.
sleep 5
mouseXY (1,0), go left ;<<< You can only comment with a semicolon, not a comma; the extra comma is causing an issue.
I can not guarantee anything, but this might work as an anti-recoil as it holds the mouse pointer in place when Left Mouse is pressed. Theoretically, it could work.
Code: Select all
#SingleInstance Force
CoordMode, Mouse, Screen
PID := (DllCall("GetCurrentProcessId")) ;PID Of Script.
Process, Priority, %PID%, Above Normal ;Improves Performance Of Script.
SetBatchLines, -1 ;Improves Performance Of Script.
~LButton::
{ MouseGetPos, x, y
While, (GetKeyState("LButton", "P"))
{ MouseMove, %x%, %y%
} } Return
~Esc::ExitApp
Also, If you want the pointer to go Left you just need a larger number:
Code: Select all
#SingleInstance Force
~LButton::
While, GetKeyState("LButton", "P")
{ MouseXY(-10,7) ;x=-10, y=+7, the bigger the number the harder the pull. (X= -=Left, +=Right) (Y= -=Up, +=Down)
MouseXY(x,y)
{ DllCall("mouse_event",int,1,int,x-10,int,y+7,uint,0,uint,0)
} Sleep, 10
} Return