Last active
February 5, 2022 04:38
-
-
Save VarunAgw/5fa6defe1a871f819f265461d5d23dd6 to your computer and use it in GitHub Desktop.
AHK Support for Stardock Groupy
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
CoordMode, Mouse, Screen | |
CoordGetWin(xCoord, yCoord, ExludeWinID="") ; CoordMode must be relative to screen | |
{ | |
WinGet, IDs, List,,, Program Manager | |
Loop, %ids% | |
{ | |
_hWin := ids%A_Index% | |
WinGetTitle, title, ahk_id %_hWin% | |
WinGetPos,,, w, h, ahk_id %_hWin% | |
;if (w < 110 or h < 110 or title = "") ; Comment this out if you want to include small windows and windows without title | |
; continue | |
WinGetPos, left, top, right, bottom, ahk_id %_hWin% | |
right += left, bottom += top | |
if (xCoord >= left && xCoord <= right && yCoord >= top && yCoord <= bottom && _hWin != ExludeWinID) | |
break | |
} | |
WinGet, WinEXE, ProcessName, ahk_id %_hWin% | |
return WinEXE | |
} | |
IsGroupyTabsWindow() { | |
WinGetPos, WinX, WinY,,, A | |
ProcessName := CoordGetWin(WinX+10, WinY+10) | |
return ProcessName == "GroupyCtrl.exe" | |
} | |
#If IsGroupyTabsWindow() | |
^Tab::Send #y | |
^+Tab::Send #^y | |
^w:: | |
MouseGetPos, X1, Y1 | |
WinGetPos, WinX, WinY, Width, Height, A | |
x2:= WinX + Width - 30 | |
y2:= WinY + 10 | |
MouseClick, L, %x2%, %y2% | |
MouseMove, X1, Y1 | |
Return | |
#If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment