【问题标题】:AHK key combination issueAHK组合键问题
【发布时间】:2015-08-22 02:37:35
【问题描述】:

完整代码:http://pastebin.com/AX8iNRE6

问题:我有各种字母组合可以触发将拉丁字母转换为西里尔字母,例如:

:*:h::
    SendInput, х
    FingerPrint(22)
    return
:*:s::
    SendInput, с
    FingerPrint(22)
    return

:*:sh::
    SendInput, ш
    FingerPrint(22)
    return

所以它会将“sh”切换为“ш”。相反,当我可能输入速度不够快(或任何其他原因)时,它开始分别替换“s”和“h”,给我“сх”

有什么办法可以解决这个问题吗?也许是等待下一个字符或其他东西的条件。

提前致谢!

【问题讨论】:

  • FingerPrint(22) 在这里可能没用,完全没有必要。我不知道它是什么,它的目的是什么。在我编辑以匹配我需要的键之前,可能来自原始脚本附带的 gui 内容。原来的每把钥匙只绑定一个字母

标签: autohotkey transliteration


【解决方案1】:

您可以尝试使用Input 自己构建一些东西。或者,更舒服的是,使用 Polythene 的动态 regEx-Hotstring library

#persistent
#include hotstrings.ahk

hotstrings("s([^h])", "c%$1%")    ; s followed by any non-h-character

return

:*:h::x
:*:sh::?

【讨论】:

    猜你喜欢
    • 2023-03-10
    • 2018-12-09
    • 1970-01-01
    • 1970-01-01
    • 2015-05-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多