Sorry guys, can't find anywhere else...
Can i MINIMIZE an ACTIVE only window with any keycode? (i always used Logi mouse and it has a built-in option for this, but now with Razer mouse i lost this feature).
All these win+M, win+d, alt+esc, alt+space-N, win+Dn are not suitable...
Win+Down is built into Windows, why won't that work?
Doesn't work on any window that is maximized (need to be pressed twice), or snapped to half a screen.
and window has also lost its maximized state when you go back to it.
You could probably use AHK to send a message to the window to do it.
MsgNumber = 0x112 (WM_SYSCOMMAND)
wParam = 0xF020 (SC_MINIMIZE)
lParam = 0
thanx a lot.this works fine
#SingleInstance Force
#NoTrayIcon
MINIMIZED := []
STATE_MINIMIZED := -1
return
; Win + Alt + Down = Minimize Window
#!Down::
{
global
for index, winid in MINIMIZED
{
if (!WinExist(winid) || WinGetMinMax(winid) != STATE_MINIMIZED)
{
MINIMIZED.RemoveAt(index)
}
}
if (hwnd := WinExist("A"))
{
winid := "ahk_id " hwnd
if (WinGetMinMax(winid) != STATE_MINIMIZED)
{
PostMessage 0x0112, 0xF020, 0,, winid ; 0x0112 = WM_SYSCOMMAND, 0xF020 = SC_MINIMIZE
MINIMIZED.Push(winid)
}
}
}
; Win + Alt + Up = Restore Window
#!Up::
{
global
for index, winid in MINIMIZED
{
if (!WinExist(winid) || WinGetMinMax(winid) != STATE_MINIMIZED)
{
MINIMIZED.RemoveAt(index)
}
}
if (MINIMIZED.Length)
{
winid := MINIMIZED.Pop()
PostMessage 0x0112, 0xF120, 0,, winid ; 0x0112 = WM_SYSCOMMAND, 0xF120 = SC_RESTORE
}
}