Code: Select all
#InstallKeybdHook
#SingleInstance force
!a:: ; Toggle onTop
WinGet, currentWindow, ID, A
WinGet, ExStyle, ExStyle, ahk_id %currentWindow%
if (ExStyle & 0x8) ; 0x8 is WS_EX_TOPMOST.
{
Winset, AlwaysOnTop, off, ahk_id %currentWindow%
Sleep, 1500
}
else
{
WinSet, AlwaysOnTop, on, ahk_id %currentWindow%
Sleep, 1500
}
return
!x:: ; Make window click through
WinGet, currentWindow, ID, A
WinSet, ExStyle, +0x80020, ahk_id %currentWindow%
return
!z::
MouseGetPos,,, MouseWin ; Gets the unique ID of the window under the mouse
WinSet, ExStyle, -0x80020, ahk_id %currentWindow%
Return