我正在尝试编写一个脚本,检测Right Mouse Click
被关闭至少1.5秒,然后F
键被按下,而Right Mouse Click
仍被保留。
我尝试了以下内容:
Loop
{
Send, {F Down}
Sleep 2000
Send, {F Up}
sleep 1500
}
return
^F::Pause
我意识到这只是一个计时器而且没有检测到按下了哪些键。如何编写实现上述功能的脚本?
答案 0 :(得分:0)
loop
{
Key := GetKeyState("rbutton")
while(Key = 0)
{
Key := GetKeyState("rbutton")
sleep,100
}
while(Key = 1)
{
sleep,100
loopnmb := A_Index
if(loopnmb = 8) ;;this number changes the length rbutton has to be pressed before F key activates
{
Key := GetKeyState("rbutton")
while(Key = 1)
{
Send, {F Down}
Key := GetKeyState("rbutton")
if(Key = 0)
{
Send, {F Up}
break
}
}
}
}
}
计时器有点偏,所以玩吧。