LButton::
^LButton::
While GetKeyState("LButton","p"){
Send {LButton}
Sleep 20
}
return
This is my current script. What it does is when I hold the left mouse button it simulates pressing it repeatedly every 20 milliseconds. But, because in the game I use it with I often have to hold Alt down to crouch I need it to work with ^LButton. But for some reason, when holding alt+LButton it just acts normally i.e. it reverts to me holding down the left mouse button.
One thing I thought of is possibly adding
While GetKeyState("LButton","p") or GetKeyState("alt LButton","p"){
However I am lacking proper syntax to pass a modifier along with a button to the GetKeyState function.
I searched through the documents and did a bit of googling but it seems like the AHK forums have been inactive for around 5 years now. If anyone knows how to solve this issue your help would be appreciated!
^
is Ctrl,!
is Alt. – CherryDTGetKeyState
then the modifier doesn't matter because Alt and LButton would be two individual keys. – CherryDT