In Autohotkey you can use SetTimer to maximize the actual active window while minimizing any other window:
#NoEnv
#SingleInstance Force
; Press F1 to enable/disable single window mode:
F1:: ; toggles the variable "enabled" between true and false
enabled := !enabled
If (enabled)
SetTimer, single_window_mode, 10
else
SetTimer, single_window_mode, off ; disable single window mode
return
single_window_mode:
If IsWindow(WinExist("A"))
{
WinGet, WinState_A, MinMax, A
If (WinState_A != 1) ; the active window isn't maximized
{
WinMaximize, A
WinGet, id, list
Loop, %id%
{
this_ID := id%A_Index%
If NOT IsWindow(WinExist("ahk_id" . this_ID))
continue
IfWinActive, ahk_id %this_ID%
continue
WinGet, WinState, MinMax, ahk_id %this_ID%
If (WinState != -1) ; the window isn't minimized
{
WinRestore, ahk_id %this_ID%
Sleep 300
WinMinimize, ahk_id %this_ID%
}
}
}
}
return
; This checks if a window is, in fact a window.
; As opposed to the desktop or a menu, etc.
IsWindow(hwnd){
WinGet, s, Style, ahk_id %hwnd%
return s & 0xC00000 ? (s & 0x100 ? 0 : 1) : 0
}
1Windows has Aero Shake feature, that will minimize all windows except the one that you shake, just click and hold on the window title bar then shake the window. To maximize the current window, just drag the window to the top border of the screen. This is the fastest way to do it in Windows, otherwise you'll need an app to do an automatic minimizing to inactive windows or so. – iSR5 – 2017-01-28T19:00:15.213
@iSR5 if you note the post, OP says he knows how he can do it manually but want something that works automatically. – LPChip – 2017-01-28T20:27:56.193
@LPChip he only mentioned using the hotkey, but not the other method that I mentioned ! So, I imagined he used the hotkeys every time and he wants a faster way to do it without pressing any keys! – iSR5 – 2017-01-28T21:42:06.093
1@iSR5 Please carefully read the question again. It clearly states "but it needs to be pressed every time. How can I do this automatically in Windows?" Shaking is still a manual action, so he clearly is not after that. – LPChip – 2017-01-28T22:41:22.493
@LPChip will do mate. Sorry for the interruption. – iSR5 – 2017-01-28T23:59:01.533
Unless I am missing something, this is a futile question. When you maximize a window, other windows are not seen, until you switch to them. So, does it matter if they are minimized or not? – None – 2017-02-04T09:37:38.750