【问题标题】:Autohotkey execute scripts自动热键执行脚本
【发布时间】:2015-01-15 15:49:13
【问题描述】:

我正在尝试使用快捷方式执行脚本,但无法执行。当我按 shift 时,代码不等待其他键并执行第一个条件。你能帮忙吗?

我的代码是这样的:

x := 500
~Shift::
sleep, 500
loop,
{
if GetKeyState("S","p")
    {
    Send, {BS}
    Sleep, 200 ; for buffer (1000 = 1second)
    Send, 600.01.02.02
    Send, {Ctrl Down}
    Send, {Enter}
    Send, {Ctrl Up}
    Return
 }
if GetKeyState("M","p")
    {
    Send, {BS}
    Sleep, 200 ; for buffer (1000 = 1second)
    Send, 600.01.05.02
    Send, {Ctrl Down}
    Send, {Enter}
    Send, {Ctrl Up}
    Return
 }
}
return

【问题讨论】:

    标签: if-statement macros autohotkey shortcut


    【解决方案1】:

    根据您需要它的工作方式,一种方法是在热键正下方使用keywait, shift

    您也可以使用多个热键在另一个下进行操作

    ~+s::
    ~+p::
    Sleep 500
    Loop
    {
    

    还有其他方法,但这两种方法都行

    【讨论】:

      猜你喜欢
      • 2013-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-07
      • 2015-03-12
      • 2017-07-17
      相关资源
      最近更新 更多