Code: Select all
WinSizeExist(Name, _W, _H){
if WinExist(Name){
WinGetPos, , , W, H
if (W = _W and H = _H)
return true
}
return false
}
if WinSizeExist("Common Title", 200, 100)
MsgBox, "You got it!"
WinExist()
This function returns the unique ID (HWND) (as hexadecimal integer) of the first matching window (0 if none).
Then I'm never finding that specific-size window I'm looking for, even if it's present.
So what's the approach here? I need to check through all the windows with WinExist, and check their H/W.
Ideas?