use*_*659 8 remote-desktop windows-7 autohotkey
如何让 AutoHotKey 热键在 Windows 7 上以全屏模式与远程桌面一起使用?
正如 user16659 指出的那样,Reload使热键再次起作用(但他的脚本对我不起作用)。
基本上,我现在有两个脚本正在运行,一个包含我的热键和热字符串"script.ahk",另一个将在 RDP 最大化时重新加载此脚本"controller.ahk"。
脚本.ahk:
#SingleInstance force
::hw::Hello World
Run Code Online (Sandbox Code Playgroud)
控制器.ahk:
Run "autohotkey" "script.ahk"
#Persistent
SetTimer, ReloadOnRDPMaximized, 500
return
ReloadOnRDPMaximized:
If WinActive("ahk_class TscShellContainerClass")
{
WinGet, maxOrMin, MinMax, ahk_class TscShellContainerClass
if (maxOrMin = 0) {
WinGetPos, PosX, PosY, WinWidth, WinHeight, ahk_class TscShellContainerClass
if (PosY = 0) {
; it is fully maximized therefore reload "script.ahk"
Run "autohotkey" "script.ahk"
; wait until window gets deactivated so you don't reload it again.
WinWaitNotActive, ahk_class TscShellContainerClass
}
}
}
return
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11346 次 |
| 最近记录: |