I have used this simple algorithms to achieve this:
Code: Select all
^h::
DetectHiddenWindows, Off
WinGet, VisibleID, List,,, Program Manager
DetectHiddenWindows, On
WinGet, CombinedID, List,,, Program Manager
i := 1, k := 1
Loop, %CombinedID%
{
j := 1
Loop, %VisibleID%
{
if (CombinedID%i% = VisibleID%j%)
break
else
j++
}
if (j > VisibleID) {
HiddenID%k% := CombinedID%i%
k++
}
i++
}
HiddenID := k - 1
return
Also, is it possible to avoid pseudo-arrays altogether?
I tried to do so, but didn't get it to work with regular arrays. Maybe this is not possible because WinGet is always going to return a pseudo-array...
It should be possible though to output HiddenID as a regular array? Could the total number of hidden windows then still be stored in a regular array? Edit: I mean stored in a way like HiddeID[0] := total_number_of_hidden_windows.