Do
x = WaitKey()
If x = 32 Then
变量="1,2,3,4,5,6,7,8,9,10,11,12"
Randomize
最小 = 1
最大 = len(变量)
返回值=mid(变量,Int((最大 - 最小 + 1) * Rnd + 最小),1)
TracePrint 返回值
If 返回值 = 1 Then
KeyPress "J", 1
End If
If 返回值 = 2 Then
KeyPress "K", 1
End If
If 返回值 = 3 Then
KeyPress "l", 1
End If
If 返回值 = 4 Then
KeyPress "u", 1
End If
If 返回值 = 5 Then
KeyPress "i", 1
End If
If 返回值 = 6 Then
KeyPress "o", 1
End If
If 返回值 = 7 Then
KeyDown 16, 1
KeyPress 74, 1
KeyUp 16, 1
End If
If 返回值 = 8 Then
KeyDown 16, 1
KeyPress 75, 1
KeyUp 16, 1
End If
If 返回值 = 9 Then
KeyDown 16, 1
KeyPress 76, 1
KeyUp 16, 1
End If
If 返回值 = 10 Then
KeyDown 16, 1
KeyPress 85, 1
KeyUp 16, 1
End If
If 返回值 = 11 Then
KeyDown 16, 1
KeyPress 73, 1
KeyUp 16, 1
End If
If 返回值 = 12 Then
KeyDown 16, 1
KeyPress 79, 1
KeyUp 16, 1
End If
End If
Loop
以上是代码
但是操作的时候就出现了问题
有时候就是成功!
有时候就不匹配!
求解

图上显示数字就是成功了
有时候就类型不匹配
大神指点江山
求解
这是个键盘随机组合的
x = WaitKey()
If x = 32 Then
变量="1,2,3,4,5,6,7,8,9,10,11,12"
Randomize
最小 = 1
最大 = len(变量)
返回值=mid(变量,Int((最大 - 最小 + 1) * Rnd + 最小),1)
TracePrint 返回值
If 返回值 = 1 Then
KeyPress "J", 1
End If
If 返回值 = 2 Then
KeyPress "K", 1
End If
If 返回值 = 3 Then
KeyPress "l", 1
End If
If 返回值 = 4 Then
KeyPress "u", 1
End If
If 返回值 = 5 Then
KeyPress "i", 1
End If
If 返回值 = 6 Then
KeyPress "o", 1
End If
If 返回值 = 7 Then
KeyDown 16, 1
KeyPress 74, 1
KeyUp 16, 1
End If
If 返回值 = 8 Then
KeyDown 16, 1
KeyPress 75, 1
KeyUp 16, 1
End If
If 返回值 = 9 Then
KeyDown 16, 1
KeyPress 76, 1
KeyUp 16, 1
End If
If 返回值 = 10 Then
KeyDown 16, 1
KeyPress 85, 1
KeyUp 16, 1
End If
If 返回值 = 11 Then
KeyDown 16, 1
KeyPress 73, 1
KeyUp 16, 1
End If
If 返回值 = 12 Then
KeyDown 16, 1
KeyPress 79, 1
KeyUp 16, 1
End If
End If
Loop
以上是代码
但是操作的时候就出现了问题
有时候就是成功!
有时候就不匹配!
求解

图上显示数字就是成功了
有时候就类型不匹配
大神指点江山
求解
这是个键盘随机组合的

我











