为什么我在使用AutoHotKey时只需按住组合键一次就可以发送字符串?

huangapple go评论47阅读模式
英文:

Why the string is send only once by holding combine keys when I using autohotkey

问题

我的脚本是

^Numpad0::Send "hello world"

当我按住Ctrl+Numpad0时,它只会输出 "hello world" 一次。然后它会输出字符 "0"。就像这样:

**hello world0000000000000**

如何通过按住Ctrl+Numpad0来重复输出 "hello world"?
英文:

My script is

^Numpad0::Send "hello world"

When I hold ctrl+Numpad0, it will output "hello world" only once. Then it will output character "0". Just like this:

hello world0000000000000

How to output "hello world" repeatedly by holding ctrl+Numpad0?

答案1

得分: 1

> $ prefix 强制使用键盘钩子来实现这个热键,这会防止 Send 命令触发它,这是一个副作用。
> $ 前缀等同于在定义此热键之前的某个地方指定 #UseHook

$^Numpad0::Send "hello world"
英文:

> The $ prefix forces the keyboard hook to be used to implement
> this hotkey, which as a side-effect prevents the Send command from
> triggering it.
> The $ prefix is equivalent to having specified #UseHook somewhere
> above the definition of this hotkey.

$^Numpad0::Send "hello world"

huangapple
  • 本文由 发表于 2023年3月1日 16:52:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/75601412.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定