Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ******
- GREASE
- ******
- This module adjusts the transparency of the active window by units of 10 using #Ins/#Del. Adding the Ctrl or Shift modifiers allows the user to fine-tune the transparency by reducing the increment to 5, 2, or 1 (hold down both).
- */
- *#Insert::
- *#Delete::
- ; This calculates the adjustment factor then passes it on to the function DoTrans
- Trans := 10 * (GetKeyState("Ctrl") ? .5 : 1) * (GetKeyState("Alt") ? .2 : 1)
- If (A_ThisHotkey = "*#Insert")
- DoTrans(Trans)
- Else
- DoTrans(-Trans)
- Return
- DoTrans(change) {
- WinGet, old, Transparent, A
- If (old = "")
- old := 255
- new := old + change
- WinSet, Transparent, %new%, A
- If (new => 255) ; saves resources when 100% opaque
- WinSet, Transparent, OFF, A
- Return
- }
Advertisement
Add Comment
Please, Sign In to add comment