Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Window not found" error at runtime but not when run in QM
#4
Maybe this function can help to debug this.

Function OutWinList
Code:
Copy      Help
;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 outw2
Code:
Copy      Help
;/
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


Messages In This Thread
RE: "Window not found" error at runtime but not when run in QM - by Gintaras - 03-01-2018, 11:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)