-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; Function to hide, make transparent, and make click-through the current topmost window | ||
HideAndModifyTopmostWindow() { | ||
; Get the handle of the topmost window | ||
WinGet, hwnd, ID, A | ||
|
||
; Attempt to hide the window using different methods | ||
WinHide, ahk_id %hwnd% | ||
WinSet, Style, -0x80000, ahk_id %hwnd% ; Remove WS_VISIBLE style | ||
WinSet, ExStyle, -0x80, ahk_id %hwnd% ; Remove WS_EX_APPWINDOW style | ||
WinSet, ExStyle, -0x20, ahk_id %hwnd% ; Remove WS_EX_TOPMOST style | ||
|
||
; Make the window transparent | ||
WinSet, Transparent, 200, ahk_id %hwnd% ; Set transparency level (0-255) | ||
|
||
; Make the window click-through | ||
WinSet, ExStyle, +0x00000020, ahk_id %hwnd% ; Add WS_EX_TRANSPARENT style | ||
|
||
; Optionally, set the window to be always on top to ensure it remains hidden | ||
WinSet, AlwaysOnTop, Off, ahk_id %hwnd% | ||
} | ||
|
||
; Hotkey to trigger the function | ||
^SPACE::HideAndModifyTopmostWindow() |
This file contains 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
This file contains 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