Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This works only on Windows 11 (it's not the latest active wnd on Windows 10).
- */
- #Requires AutoHotkey 2.0
- #NoTrayIcon
- A_KeyDelay := -1 ; For Send b/c it reverts to the Event SendMode when another AHK script installs a native low-level keyboard hook
- ; https://www.autohotkey.com/docs/v2/misc/RegEx-QuickRef.htm (Regular Expressions [RegEx] - Quick Reference)
- ; ClassNN argument consists of three classes seperated by the | (OR) symbol, the first two for W11 and the third one for W10 (can be seen by using WinSpy++ on the app section in taskbar)
- #HotIf MouseIsOverControl("ahk_class Shell_TrayWnd", "iS)\QWindows.UI.Composition.DesktopWindowContentBridge1\E|MSTaskSwWClass1|MSTaskListWClass")
- ~*LButton::Send("{Blind+!#}{Ctrl down}"), KeyWait("LButton"), Send("{Blind+!#}{Ctrl up}")
- MouseIsOverControl(winTitle, classNN)
- {
- try return (MouseGetPos(,, &winId, &control), WinExist(winTitle " ahk_id " winId) && control ~= classNN)
- return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement