Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetWindowList
#1
okay i am making a combo that gets all the Instant Messages names and puts them into it
but the problem is that the code keeps getting ALL windows open and putting them into it
I would like to know if anyone could fix the code to only get windows with the name
"Instant Message" in them
Thanks

Here is the code
Code:
Copy      Help
ARRAY(int) a
GetWindowList 0 0 1|4 0 0 a
int i
int h
for i 0 a.len
,h=a[i]
,if(h=win("Instant Message")) continue
,str s.getwintext(h)
,int dd=id(3 "Form")
,SendMessage dd i 0 0
,SendMessage dd CB_ADDSTRING 0 s

im not sure if in the 7th line the "Instant Message" is even suppossed to be there

Thanks
#2
if(h=win("
replace to
if(wintest(h "

Or instead of GetWindowList use win. In new QM versions, it supports ARRAY too, see examples in QM Help.

---
what's this?: SendMessage dd i 0 0
#3
that is how u put it in the combo


ARRAY(int) a
GetWindowList 0 0 1|4 0 0 a
int i
int h
for i 0 a.len
,h=a[i]
,if(wintest(h "Instant Message")) continue
,str s.getwintext(h)
,int dd=id(3 "Form")
,SendMessage dd i 0 0
,SendMessage dd CB_ADDSTRING 0 s



that still puts all the windows into the combo
#4
sorry, forgot !

if(!wintest
#5
Thank you so much bro

it works perfectly


Forum Jump:


Users browsing this thread: 1 Guest(s)