В Autohotkey вы можете использовать SetTimer, чтобы максимизировать фактическое активное окно при минимизации любого другого окна:
#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
}