作业帮 > 综合 > 作业

按键精灵使用 比如我按下A键就等于变成10,按下S就变成20,按下D就变成30..怎么设置呢?

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/15 14:06:15
按键精灵使用 比如我按下A键就等于变成10,按下S就变成20,按下D就变成30..怎么设置呢?
Rem q
Key=WaitKey()
If Key = 65 Then
KeyPress "Num 1",1
KeyPress "Num 0",1
ElseIf Key = 83 Then
KeyPress "Num 2",1
KeyPress "Num 0",1
ElseIf Key = 68 Then
KeyPress "Num 3",1
KeyPress "Num 0",1
Else
Goto q
End If
Goto q
再问: 这是什么??看不懂,能详细点吗
再答: 已经很详细了,你把源码复制到按键看翻译就懂了
再问: 我把源码复制到按键了,,,按A可以变成A10了。。。但我只是想10.。。不是A10。。你能帮我把源码改下吗。。。谢谢
再答: Rem q Key=WaitKey() If Key = 65 Then KeyPress "BackSpace", 1 KeyPress "Num 1", 1 KeyPress "Num 0", 1 ElseIf Key = 83 Then KeyPress "BackSpace", 1 KeyPress "Num 2", 1 KeyPress "Num 0", 1 ElseIf Key = 68 Then KeyPress "BackSpace", 1 KeyPress "Num 3", 1 KeyPress "Num 0", 1 Else Goto q End If Goto q