Autohotkey Hotkey触发另一个热键

问题描述 投票:2回答:3

同样,我是Autohotkey部分的新手,这是我现在面临的一个问题。好的,让我解释一下如下。

a::
  loop
  {
    ; do something
    break
  }
  Send,{b}
return

b::
  ; do something
  Send,{a}
return

当按下“a”时,罚款称为“b”活动,但在此之后,在“b”内,它不能再次调用“a”。为什么?

loops autohotkey hotkeys
3个回答
0
投票

使用最新的Autohotkey Release(v1.1.22.09)代码创建一个无限循环调用自身:

a::
  loop
  {
    MsgBox % "A Hotkey"
    break
  }
  Send b
return

b::
  MsgBox % "B Hotkey"
  Send a
return

我假设您删除了“做某事”代码,其中存在真正的问题。


0
投票

你可以用标签来做。

test:a :: loop {;做一些破解}发送,{b}返回

b ::;做点什么,测试回归


0
投票

使用GoSub。例:

!z::
    MsgBox, z
return

F10::
    Gosub, !z
return
© www.soinside.com 2019 - 2024. All rights reserved.