1、当输入密码无法使用“SayString”、“Ctrl+V”时,改用“KeyPress”的方法
戏谷游戏的登录画面,“密码输入” 是会挡按键精灵的“SayString”这指令,还有“Ctrl+V”贴上的方式。
所以只能模拟手动按键“KeyPress”的方式。
提供按键精灵脚本6.71版,范例脚本参考:
Dim a
// 密码
PSW="AbcdzZ12345"
// 计算密码长度
PSW_Len=Len(PSW)
ReDim a(PSW_Len)
i=0
For PSW_Len
a(i) = Mid(PSW,1+i,1)
If Asc(a(i))>=97 and Asc(a(i))<=122
// 英文大写
KeyPress Asc(a(i))-32,1
ElseIf Asc(a(i))>=65 and Asc(a(i))<=90
// 英文小写
KeyDown 16,1
KeyPress Asc(a(i)),1
KeyUp 16,1
ElseIf Asc(a(i))>=48 and Asc(a(i))<=57
// 数字
KeyPress Asc(a(i)),1
Else
MessageBox "密码: " & PSW &" 含有符号,不适用此脚本"
EndScript
EndIf
i = i + 1
EndFor
2、复制代码
1 |
//下面这句是设置剪切板内容 |
2 |
Call Plugin .Sys.SetCLB( "剪切板内容" )
|
3 |
Msgbox "设置剪切板内容"
|
KeyDown 17, 1