Jef*_*rod 14 autohotkey multiple-monitors
使用AutoHotkey,如何绑定热键以跨多个监视器拉伸/最大化/跨越窗口,以便它覆盖两个显示?
现在,我必须通过用鼠标手动拉伸窗口来做到这一点.我知道有专门的工具可以做到这一点,但我已经运行了一个AutoHotkey脚本,宁愿限制我继续运行的工具数量.
Jef*_*rod 22
这就是我如何做到这一点,映射Shift + Windows + Up
组合以最大化所有显示器的窗口.这与Windows 7的Windows + Up
热键相称,它可以最大化所选窗口.
+#Up::
WinGetActiveTitle, Title
WinRestore, %Title%
SysGet, X1, 76
SysGet, Y1, 77
SysGet, Width, 78
SysGet, Height, 79
WinMove, %Title%,, X1, Y1, Width, Height
return
Run Code Online (Sandbox Code Playgroud)
小智 6
我知道这个线程有点旧,但这是迄今为止最好的"免费"方式跨越我已经能够找到的多个监视器的最大化.我现在在Windows 8和7 64位系统上使用它,这个宏可能会成为我的默认工具包的一部分:)谢谢堆.
我发布的原因是,我稍微对其进行了修改以将窗口恢复为单个监视器大小,因为一旦UP宏运行,您将不得不手动将窗口拖回单个子监视器大小,如果期望.我已经在shift + windows + down组合中添加了这样做.它可能会更好地记住Windows旧位置,但我不是一个自动键专家,这适用于我的目的...(你也可以改变"A_ScreenWidth,A_ScreenHeight"说800,600更小的工作使用,并调整0,0以使屏幕居中,比如300,200)
使用autohotkey exe编译器,你有一个便携式exe在另一台PC上使用.(即我的办公室计算机将运行exe罚款,但我需要管理员帐户来安装完整的程序:D)
+#Up::
WinGetActiveTitle, Title
WinRestore, %Title%
SysGet, X1, 76
SysGet, Y1, 77
SysGet, Width, 78
SysGet, Height, 79
WinMove, %Title%,, X1, Y1, Width, Height
return
+#Down::
WinGetActiveTitle, Title
WinRestore, %Title%
WinMove, %Title%,, 0, 0, A_ScreenWidth, A_ScreenHeight
return
Run Code Online (Sandbox Code Playgroud)
我在工作和家里有两个显示器,我的任务栏在左边,所以我需要调整这个脚本以确保它正确移动窗口。
+#Up::
WinGetActiveTitle, Title
WinRestore, %Title%
SysGet, Mon1, MonitorWorkArea, 1
SysGet, Mon2, MonitorWorkArea, 2
Monitor1Width := Mon1Right - Mon1Left
Monitor2Width := Mon2Right - Mon2Left
MonitorsWidth := Monitor1Width + Monitor2Width
SysGet, Height, 79
WinMove, %Title%,, %Mon1Left%, %Mon1Top%, %MonitorsWidth%, %Mon2Bottom%
return
+#Down::
WinGetActiveTitle, Title
WinRestore, %Title%
SysGet, Mon2, MonitorWorkArea, 1
Monitor1Width := Mon2Right - Mon2Left
WinMove, %Title%,, %Mon2Left%, %Mon2Top%, %Monitor1Width%, %Mon2Bottom%
return
Run Code Online (Sandbox Code Playgroud)