【问题标题】:How to disable a hotkey only if the active window is a given size?仅当活动窗口为给定大小时,如何禁用热键?
【发布时间】:2021-11-02 18:02:36
【问题描述】:

我只想在活动窗口为 500px 宽和 300px 高的情况下禁用 Shift,如何编写这样的脚本?

【问题讨论】:

    标签: automation scripting keyboard-shortcuts autohotkey hotkeys


    【解决方案1】:

    使用上下文相关的热键(#If(docs))非常容易实现。

    #If, SizeCheck()
    RShift::
    LShift::return
    #If
    
    SizeCheck()
    {
        WinGetPos, , , width, height, A
        return width == 500 && height == 300
    }
    

    请务必添加您认为合适的 * 修饰符(docs)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-12-27
      • 2016-07-09
      • 2015-01-15
      • 1970-01-01
      • 2012-10-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多