Using AutoHotkey, How can I bind a hotkey to stretch/maximize/span a window across multiple monitors so that it covers both displays?
Right now, I have to do this by man
I have two monitors at work and at home with my task bar on the left so I needed to tweak this script to ensure it moved the window correctly.
+#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