Created
September 8, 2025 02:44
-
-
Save Ooseykins/c98b930831473de161a497cfe543d2a8 to your computer and use it in GitHub Desktop.
AutoHotkey 1.1.37.02 script for changing window properties, for Vtubing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #SingleInstance | |
| ; Hotkey for toggling the title bar | |
| #!0:: ToggleTitle() | |
| ; Hotkeys for progressively more opaque windows | |
| #!1:: ToggleTransparency(25) | |
| #!2:: ToggleTransparency(50) | |
| #!3:: ToggleTransparency(75) | |
| #!4:: ToggleTransparency(100) | |
| #!5:: ToggleTransparency(125) | |
| #!6:: ToggleTransparency(150) | |
| #!7:: ToggleTransparency(175) | |
| #!8:: ToggleTransparency(200) | |
| #!9:: ToggleTransparency(225) | |
| ToggleTransparency(opacity := 100){ | |
| WinExist("A") ; Use the active window | |
| WinGet ExStyle, ExStyle ; Get the ExStyle into a variable | |
| if (ExStyle & 0x80028) == 0x80028 { ; WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | |
| WinSet AlwaysOnTop, Off ; Uses SetWindowPos instead of SetWindowLong. | |
| WinSet ExStyle, -0x80028 ; Remove clickthough and transparency. | |
| WinSet Transparent, Off | |
| } else { | |
| WinSet AlwaysOnTop, On ; Although WS_EX_TOPMOST (0x8) is an ExStyle, it requires SetWindowPos. | |
| WinSet ExStyle, +0x80028 ; Add clickthough and transparency. | |
| WinSet TransColor, 000000 %opacity% ; Opacity of the window | |
| } | |
| } | |
| ToggleTitle(){ | |
| WinExist("A") ; Use the active window | |
| WinGet Style, Style ; Get the Style into a variable | |
| if (Style & 0xC40000) == 0xC40000 { | |
| WinSet Style, -0xC40000 ; Hide title bar | |
| } else { | |
| WinSet Style, +0xC40000 ; Show title bar | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment