问题
So this sequence resets itself after 1.5 sec which means if i dont hit the left mouse button for 1.5 sec it always sends A.
I want to further tweak this code with another function which is to be able to reset it with right mouse button too. So if i hit RButton any time it should reset to A. THX
global s:=0, c:=0, t:=1500, t2:=380
*LButton::
Send % Seqkeys("A","B","C")
KeyWait, LButton
Send, R
If (A_TickCount-s < t2)
c := 0
return
Seqkeys(params*) {
global s, c, t
max := params.MaxIndex()
(A_TickCount-s<=t && (c+=1)<=max) ? c : c:=1
s := A_TickCount
return params[c]
}
UPDATE: so i found this code with these variables so if i hit right click here it resets the sequence... How can implement this function to mine?
RButton::var:=0
LButton::
var++
If (var=1)
Send A
else if (var=2)
Send B
else if (var=3)
{
Send C
var:=0
}
return
来源:https://stackoverflow.com/questions/64796721/how-to-reset-a-key-sequence-with-a-specific-key