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 know this thread is a little old, but this is by far the best "free" way to span maximise across multiple monitors i've been able to find. Ive used it now on both windows 8 and 7 64bit systems and this macro will probably become part of my default toolkit :) Thanks heaps.
And the reason why i'm posting, is i've modified it slightly to restore the window back to a single monitor size, as once the UP macro runs, you will have to manually drag the window back to single sub-monitor size if desired. I've added in a shift+windows+down combo to do this. It could probably be done better remembering the windows old position, but i am not an autohotkey expert, and this works for my purposes... (you could also change the "A_ScreenWidth, A_ScreenHeight" to say 800, 600 for something smaller to work with, and tweak the 0,0 to centre the screen, say 300,200)
Use the autohotkey exe compiler and you have a portable exe to use on another pc. (i.e. my office computer will run the exe fine, but i'd have needed the admin account to install the full program :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