按键精灵 如何实现某个键按一下是A,在按一下是B?

2024-11-17 03:37:31
推荐回答(2个)
回答1:

Rem A


A = WaitKey()


If A = 65 Then //a的按键码是65


KeyPress "BackSpace", 1


KeyPress "A", 1


Else


End If


A = WaitKey()


If A = 65 Then //a的按键码是65


KeyPress "BackSpace", 1


KeyPress "B", 1


Else 


End If


Goto A


回答2:

获取上一次按键码就能实行,代码如下:
i=GetLastKey()
If i=65//a的按键码是65
KeyPress "B", 1
Else
End If