发布网友 发布时间:2022-05-02 05:05
共1个回答
热心网友 时间:2022-06-28 11:53
Call 获取输入框按键码
SetSimMode 2
d = split(c, "|")
Do
Do
e=WaitKey
If Form1.CheckBox1.Value = 1 and e = 81 Then
LeftClick 1
Exit Do
ElseIf Form1.CheckBox2.Value = 1 and e = 87 Then
LeftClick 1
Exit Do
ElseIf Form1.CheckBox3.Value = 1 and e = 69 Then
LeftClick 1
Exit Do
ElseIf Form1.CheckBox4.Value = 1 and e = 82 Then
LeftClick 1
Exit Do
ElseIf Form1.CheckBox5.Value = 1 and e = 68 Then
LeftClick 1
Exit Do
ElseIf Form1.CheckBox6.Value = 1 and e = 70 Then
LeftClick 1
Exit Do
ElseIf Form1.CheckBox7.Value = 1 and e = 84 Then
LeftClick 1
Exit Do
End If
For i = 1 To UBound(d) - 1
If CStr(e) = d(i) Then
LeftClick 1
Exit Do
End If
Next
Loop
Loop
Sub 获取输入框按键码
a = split(Form1.InputBox1.Text, "/")
SetSimMode 2
For i = 0 To UBound(a)
Call Lib.键盘.键盘按键组(a(i), 0, 0)
c = c & "|" & GetLastKey
Next
SetSimMode 0
End Sub
这是我做的一个魔兽争霸智能施法,你可以参考一下
其实也支持系统按键的,比如Alt/就可以了