in essence, press a button to toggle a button to be held down
there are 4 buttons, in which i need to seperately choose which to hold, and which to manually press.
QWER are the buttons, which need to be activated.
i have gotten them working seperately.
the issue i have, is if i try to have E, as well as R running at the same time, it does not work.
since it is still registering a hold from the first one, the second will not start, until i deactivate the first.
thank you so much for any help!
The code is as follows;
Code: Select all
;;#######################
;;##### HOLD Q Down #####
;;#######################
1::
Loop
{
If A_Index = 1
Sleep, 500
GetKeyState, State, 1, P
If State = D
Break
Send {q Down}
}
Send {q Up}
Sleep, 500
Return
;;#######################
;;##### HOLD W Down #####
;;#######################
2::
Loop
{
If A_Index = 1
Sleep, 500
GetKeyState, State, 2, P
If State = D
Break
Send {w Down}
}
Send {w Up}
Sleep, 500
Return
;;#######################
;;##### HOLD E Down #####
;;#######################
3::
Loop
{
If A_Index = 1
Sleep, 500
GetKeyState, State, 3, P
If State = D
Break
Send {e Down}
}
Send {e Up}
Sleep, 500
Return
;;#######################
;;##### HOLD R Down #####
;;#######################
4::
Loop
{
If A_Index = 1
Sleep, 500
GetKeyState, State, 4, P
If State = D
Break
Send {r Down}
}
Send {r Up}
Sleep, 500
Return