diff options
-rw-r--r-- | tt.windows.ahk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tt.windows.ahk b/tt.windows.ahk index e6b93f5..26748a0 100644 --- a/tt.windows.ahk +++ b/tt.windows.ahk @@ -12,7 +12,44 @@ Gui, FakeWindow:Show, x0 y%y% AutoSize NA, FakeWindow ;; -> body +; Raise all windows of the same process +LWin Up:: +Loop, 2 +{ + hwnd := WinActive("A") + WinGet, exe, ProcessName, A + WinGet, L, List, ahk_exe %exe% + Loop, % L + { + DllCall("SetWindowPos" + , "UInt", L%A_Index%, "UInt", hwnd + , "Int", 0, "Int", 0, "Int", 0, "Int", 0 + , "UInt", 0x0001|0x0002|0x4000) ; SWP_NOSIZE|SWP_NOMOVE|SWP_ASYNCWINDOWPOS + } +} +return + +; Hide all windows of the same process (except the current one) ++LWin Up:: +Loop, 2 +{ + hwnd := WinActive("A") + WinGet, exe, ProcessName, A + WinGet, L, List, ahk_exe %exe% + Loop, % L + { + if (L%A_Index% = hwnd) + continue + DllCall("SetWindowPos" + , "UInt", L%A_Index%, "UInt", 1 ; HWND_BOTTOM + , "Int", 0, "Int", 0, "Int", 0, "Int", 0 + , "UInt", 0x0001|0x0002|0x4000) ; SWP_NOSIZE|SWP_NOMOVE|SWP_ASYNCWINDOWPOS + } +} +return + #t::WinSet, AlwaysOnTop, Toggle, A +#o::WinSet, AlwaysOnTop, Toggle, A #f:: WinGet, t, Transparent, A if (t = OFF) |