Skip to content

Instantly share code, notes, and snippets.

@NKid
Created April 26, 2013 09:32
Show Gist options
  • Save NKid/f898f4c12225d698c1cf to your computer and use it in GitHub Desktop.
Save NKid/f898f4c12225d698c1cf to your computer and use it in GitHub Desktop.
Transparentizing Window
;Increase the transparency of the active window.
#WheelUp::
WinGetClass, class, A
if (class <> "Progman")
{
DetectHiddenWindows, on
WinGet, curtrans, Transparent, A
if ! curtrans
curtrans = 255
newtrans := curtrans + 8
if newtrans > 0
{
WinSet, Transparent, %newtrans%, A
}
else
{
WinSet, Transparent, OFF, A
WinSet, Transparent, 255, A
}
}
Return
;Decrease the transparency of the active window.
#WheelDown::
WinGetClass, class, A
if (class <> "Progman")
{
DetectHiddenWindows, on
WinGet, curtrans, Transparent, A
if ! curtrans
curtrans = 255
newtrans := curtrans - 8
if newtrans > 0
{
WinSet, Transparent, %newtrans%, A
}
}
Return
;Reset the transparency of the active window.
#O::
WinSet, Transparent, 255, A
WinSet, Transparent, OFF, A
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment