aboutsummaryrefslogtreecommitdiff
path: root/tt.windows.ahk
diff options
context:
space:
mode:
Diffstat (limited to 'tt.windows.ahk')
-rw-r--r--tt.windows.ahk82
1 files changed, 41 insertions, 41 deletions
diff --git a/tt.windows.ahk b/tt.windows.ahk
index b8eb857..ec6532c 100644
--- a/tt.windows.ahk
+++ b/tt.windows.ahk
@@ -18,9 +18,9 @@ Gui, FakeWindow:Show, x0 y%y% AutoSize NA, FakeWindow
#y::
WinGet, t, Transparent, A
if (t = OFF)
- WinSet, Transparent, 180, A
+ WinSet, Transparent, 180, A
else
- WinSet, Transparent, OFF, A
+ WinSet, Transparent, OFF, A
return
#b::WinSet, Bottom,, A
#!m::WinMove, A,, 0, 0
@@ -29,9 +29,9 @@ return
#v::
WinGet, mm, MinMax, A
if (mm = 1)
- WinRestore, A
+ WinRestore, A
else
- WinMaximize, A
+ WinMaximize, A
return
#x:: ; minimize all except current
@@ -44,7 +44,7 @@ WinSet, Style, % s, ahk_id %hwnd%
WinActivate, ahk_id %hwnd%
WinGet, mm, MinMax, ahk_id %hwnd%
if (mm = -1)
- WinRestore, ahk_id %hwnd%
+ WinRestore, ahk_id %hwnd%
return
#c:: ; minimize last window
@@ -78,14 +78,14 @@ return
$!Tab::
HandleAltTab:
if (WindowDisabled)
- WinSet, Disable,, ahk_id %WindowDisabled%
+ WinSet, Disable,, ahk_id %WindowDisabled%
SendInput, {LAlt Down}{Tab}
Hotkey, $!Tab, HandleAltTab, Off
Hotkey, $!+Tab, HandleAltShiftTab, Off
while (GetKeyState("LAlt", "P") and not esc := GetKeyState("Esc", "P"))
- Sleep, 1
+ Sleep, 1
if (esc)
- SendInput, {Esc}
+ SendInput, {Esc}
SendInput, {LAlt Up}
Hotkey, $!Tab, HandleAltTab, On
Hotkey, $!+Tab, HandleAltShiftTab, On
@@ -95,17 +95,17 @@ return
$!+Tab::
HandleAltShiftTab:
if (WindowDisabled)
- WinSet, Disable,, ahk_id %WindowDisabled%
+ WinSet, Disable,, ahk_id %WindowDisabled%
if (WinActive("A") = WindowDisabled)
- SendInput, {LAlt Down}{LShift Down}{Tab}{LShift Up}{Tab}
+ SendInput, {LAlt Down}{LShift Down}{Tab}{LShift Up}{Tab}
else
- SendInput, {LAlt Down}{LShift Down}{Tab}{LShift Up}
+ SendInput, {LAlt Down}{LShift Down}{Tab}{LShift Up}
Hotkey, $!Tab, HandleAltTab, Off
Hotkey, $!+Tab, HandleAltShiftTab, Off
while (GetKeyState("LAlt", "P") and not esc := GetKeyState("Esc", "P"))
- Sleep, 1
+ Sleep, 1
if (esc)
- SendInput, {Esc}
+ SendInput, {Esc}
SendInput, {LAlt Up}
Hotkey, $!Tab, HandleAltTab, On
Hotkey, $!+Tab, HandleAltShiftTab, On
@@ -118,8 +118,8 @@ hwndp := WinActive("A")
MouseGetPos,,, hwnd
if (hwnd = hwndp)
{
- WinSet, Top,, A
- return
+ WinSet, Top,, A
+ return
}
DllCall("SetForegroundWindow", "UInt", hwnd)
WinSet, AlwaysOnTop, On, ahk_id %hwndp%
@@ -132,15 +132,15 @@ return
WindowsWindowMessage(wParam, lParam)
{
- static HSHELL_GETMINRECT := 5
- ; The active window is 0 during minimization (if animated)
- if (wParam = HSHELL_GETMINRECT and WinActive("A") = 0)
- {
- hwnd := NumGet(lParam + 0)
- WinWaitNotActive, ahk_id 0
- Sleep, 20
- InsertAfter(hwnd, "BOTTOM")
- }
+ static HSHELL_GETMINRECT := 5
+ ; The active window is 0 during minimization (if animated)
+ if (wParam = HSHELL_GETMINRECT and WinActive("A") = 0)
+ {
+ hwnd := NumGet(lParam + 0)
+ WinWaitNotActive, ahk_id 0
+ Sleep, 20
+ InsertAfter(hwnd, "BOTTOM")
+ }
}
;; -> init
@@ -153,21 +153,21 @@ WindowMessageHandlers.Push("WindowsWindowMessage")
InsertAfter(hwnd = "", position = "BOTTOM")
{
- static SWP_NOSIZE := 0x0001
- static SWP_NOMOVE := 0x0002
- static SWP_ASYNCWINDOWPOS := 0x4000
- static HWND_BOTTOM := 1
- static HWND_NOTOPMOST := -2
- static HWND_TOP := 0
- static HWND_TOPMOST := -1
- if (hwnd = "")
- WinGet, hwnd, id, A
- DllCall("SetWindowPos"
- , "UInt", hwnd
- , "UInt", HWND_%position%
- , "Int", 0
- , "Int", 0
- , "Int", 0
- , "Int", 0
- , "UInt", SWP_NOSIZE | SWP_NOMOVE | SWP_ASYNCWINDOWPOS)
+ static SWP_NOSIZE := 0x0001
+ static SWP_NOMOVE := 0x0002
+ static SWP_ASYNCWINDOWPOS := 0x4000
+ static HWND_BOTTOM := 1
+ static HWND_NOTOPMOST := -2
+ static HWND_TOP := 0
+ static HWND_TOPMOST := -1
+ if (hwnd = "")
+ WinGet, hwnd, id, A
+ DllCall("SetWindowPos"
+ , "UInt", hwnd
+ , "UInt", HWND_%position%
+ , "Int", 0
+ , "Int", 0
+ , "Int", 0
+ , "Int", 0
+ , "UInt", SWP_NOSIZE | SWP_NOMOVE | SWP_ASYNCWINDOWPOS)
}