【问题标题】:Need help trying to create a simple script需要帮助尝试创建一个简单的脚本
【发布时间】:2013-02-10 05:20:45
【问题描述】:

所以我不知道我到底在做什么,但我需要一个非常简单的脚本的帮助。

基本思想是按一个键,例如 k,每秒四次,重复直到用命令 (Alt-x) 关闭脚本。

我正在使用 Autohotkey 脚本编辑器。

【问题讨论】:

    标签: autohotkey


    【解决方案1】:

    您可以使用Timers

    示例代码:

    F1::                          ;key that launches this code
        SetTimer, SendKeyK,250    ;set timer to repeat every 250 miliseconds
    return                        ;end
    
    F2::
        SetTimer, SendKeyK,Off    ;turn of the timer
    return
    
    
    SendKeyK:
        Send, {k}    ;timer sends (presses) the key k
    return
    

    如您所见,无需退出脚本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多