zoukankan      html  css  js  c++  java
  • 按键精灵saystring无法使用的几种解决方案

     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 "设置剪切板内容"

    然后再用ctrl+v黏贴出来 

      KeyDown 17, 1

    KeyPress 86, 1
    KeyUp 17, 1
  • 相关阅读:
    一些 SQLite技巧
    linux增加swap空间
    linux解压命令
    数据库常用语句
    服务器命令
    Clickhouse高可用配置总结
    MySQL笔记
    Linux查看硬件信息
    Greenplum安装
    ClickHouse学习笔记
  • 原文地址:https://www.cnblogs.com/itfat/p/7279746.html
Copyright © 2011-2022 走看看