方法1 :
Sub 输帐号密码(帐号密码)
For i = 1 To len(帐号密码)
码 = mid(帐号密码, i, 1)
KeyPress 码, 1
Delay 10
Next
End Sub
Call 输帐号密码(“qwwe2222”)
复制代码
用方法1 你会 发现不会区分大小写字母
方法2 :
Sub 输入账号密码(帐号密码)
For i = 1 to len(帐号密码)
键码 = asc(mid(帐号密码, i, 1))
If 键码>=48 and 键码<=57
KeyPress 键码,1
ElseIf 键码>=97 and 键码<=122
KeyPress 键码-32,1
ElseIf 键码>=65 and 键码<=90
KeyPress 20,1
Delay 36
KeyPress 键码,1
Delay 36
KeyPress 20,1
ElseIf 键码>=44 and 键码<=46
KeyPress 键码+144,1
Else
MessageBox “你的输入非法”
End If
Delay 10
Next
End Sub
Call 输入账号密码(“qwwe2222”)
复制代码