03-01-2018, 11:56 AM
Maybe this function can help to debug this.
Function OutWinList
Function outw2
Function OutWinList
;Shows handles classnames and names of all visible windows in QM output.
out
ARRAY(int) a
win "" "" "" 0 "" a
int i
for i 0 a.len
,outw2 a[i]
out a.len;/
function hwnd [$prefix] [str&sOut]
;Displays window handle, class, text (first line) and program in QM output.
;sOut (QM 2.3.5) - if used, stores text in the variable, else displays in QM output.
;REMARKS
;Colors: gray if invisible; olive if cloaked (but IsWindowVisible returns 1).
if(!hwnd) out "%s0" prefix; ret
if(!IsWindow(hwnd)) out "%s%i <invalid handle>" prefix hwnd; ret
str sc.getwinclass(hwnd); err
str st.getwintext(hwnd); err
st.trim; st.getl(st 0); st.LimitLen(100 1)
str se.getwinexe(hwnd)
int col; if(!IsWindowVisible(hwnd)) col=0x808080; else if(IsWindowCloaked(hwnd)) col=0x8080
str s=F"<><c 0x{col}><_>{prefix}{hwnd} {sc}</_></c> <c 0x8000><_>''{st}''</_></c> <c 0xff0000>{se}</c>"
if(&sOut) sOut=s; else out s