Hello, folks...
I know the ahk_id of a window and I want to know if that window is in a specific ahk_group.
Is there a clever way to check?
Should "IfWinExist, ahk_ID %MyWinID% ahk_group %MyWinGroup%" work? It's not working for me. Wondering if I'm just missing something.
Check if a WinID is in a WinGroup Topic is solved
Re: Check if a WinID is in a WinGroup Topic is solved
- The idea appears to work for me.
- Sometimes hotkey subroutines fail to run if the active window is admin, and AHK is not admin. Cheers.
- Sometimes hotkey subroutines fail to run if the active window is admin, and AHK is not admin. Cheers.
Code: Select all
q:: ;test ahk_id combined with ahk_group
DetectHiddenWindows, Off
GroupAdd, WinGroup, ahk_class Notepad
GroupAdd, WinGroup, ahk_class IEFrame
vWinGroup := "WinGroup"
WinGet, hWnd, ID, A
hWnd1 := WinExist("ahk_group " vWinGroup)
hWnd2 := WinExist("ahk_id " hWnd " ahk_group " vWinGroup)
MsgBox, % hWnd1 "`r`n" hWnd2
return
Last edited by jeeswg on 04 Dec 2018, 15:09, edited 2 times in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Check if a WinID is in a WinGroup
Thanks, jeeswg, I modified your code and it's working now!
Who is online
Users browsing this forum: Chunjee, gsxr1300, inseption86, jaka1, mebelantikjaya, mikeyww and 308 guests