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
KeyPress 86, 1
KeyUp 17, 1
