gpt4 book ai didi

autohotkey - #(哈希)不代表 Windows 键时是什么意思?

转载 作者:行者123 更新时间:2023-12-03 16:29:19 26 4
gpt4 key购买 nike

不确定在哪里搜索或如何定义关键字。以下有什么区别?

#IfWinActive, Some Window Title
IfWinActive, Some Window Title

# 在那里做什么?我知道在快捷方式中,# 代表 Windows 键,但肯定这一定有其他含义。

我一直在尝试编写脚本,但 If-else block 根本不起作用。最后我想通了,这是因为我添加了 # 符号。但我没有找到任何关于这种 # 符号使用的文档。

最佳答案

散列是一个完全不同的命令。如果您在 autohotkey 文档中搜索索引,您将找到 IfWinActive#IfWinActive 的条目。

[The hash...] Creates context-sensitive hotkeys and hotstrings. Such hotkeys perform a different action (or none at all) depending on the type of window that is active or exists.

The #IfWin directives are positional: they affect all hotkeys and hotstrings physically beneath them in the script. They are also mutually exclusive; that is, only the most recent one will be in effect.

# 仅在您将其用作热键指定名称时代表 Windows 键。在 AutoHotkey 中,只要您在命令开头看到 #,它就与 AutoHotkey 指令有关。

结论:

如果您只需要常规的 if-else 语句并且不需要影响热键的上下文,那么不要使用 #.

关于autohotkey - #(哈希)不代表 Windows 键时是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22525478/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com