Skip to content

Instantly share code, notes, and snippets.

@amaurycatelan
Forked from Zazcallabah/transparency.ahk
Created May 18, 2021 04:14
Show Gist options
  • Save amaurycatelan/aa84448d5a93d25607e4c013f66b4c49 to your computer and use it in GitHub Desktop.
Save amaurycatelan/aa84448d5a93d25607e4c013f66b4c49 to your computer and use it in GitHub Desktop.
AutoHotkey Script for controlling transparency of windows. I cant remember who made this, saved for future reference
; [Win+A] Toggle always on top
#a:: Winset, Alwaysontop, , A
; [Win+WheelUp] Increase opacity
#WheelUp::
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
; [Win+WheelDown] Decrease opacity
#WheelDown::
DetectHiddenWindows, on
WinGet, curtrans, Transparent, A
if ! curtrans
curtrans = 255
newtrans := curtrans - 8
if newtrans > 0
{
WinSet, Transparent, %newtrans%, A
}
return
; [Win+O] Set opacity 50%
#o::
WinSet, Transparent, 127, A
return
; [Ctrl+Win+O] Reset opacity
^#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