Advertisement
This is comment for paste
Time Saver (redundant version of God Mode).ahk
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; this has not been tested, but might work (I'm trying an even better way for now, activating WorkerW and then GroupActivate to go back)
- #HotIf (WinActive("ahk_exe notepad.exe") || WinActive("- Visual Studio Code ahk_class Chrome_WidgetWin_1"))
- ;MButton::WinActivate("ahk_class Progman")
- MButton::
- {
- A_ControlDelay := -1 ; Changes only the control delay of the thread made for this specific hotkey
- global lastActiveWnd := WinExist("A")
- WinActivate("ahk_class Progman")
- ControlClick("x0 y0", "ahk_class Progman",,,, "Pos")
- HookEvent(EVENT_SYSTEM_FOREGROUND, HandleActivatedWindowTextEditorEvent)
- HandleActivatedWindowTextEditorEvent(hWinEventHook, event, hWnd, *)
- {
- try
- if (!WinGetClass(hWnd) = "Progman" || !WinGetClass(hWnd) = "WorkerW")
- {
- DllCall("UnhookWinEvent", "Ptr", hWinEventHook)
- global lastActiveWnd := unset
- }
- }
- }
- ;#HotIf (WinActive("ahk_class WorkerW"))
- #HotIf (WinActive("ahk_class Progman"))
- MButton::try WinActivate(lastActiveWnd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement