Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open windows stored into CB box
#1
ARRAY(int) a
GetWindowList 0 0 1|4 0 0 a
int i
int h
int g = ""
for i 0 a.len
h=a[i]
if(!wintest(h "")) continue
str s.getwintext(h)
int dd=id(13 "dialog")
SendMessage dd i 0 0
SendMessage dd CB_ADDSTRING 0 s

WHAT THIS CODE DOES IS TAKE ALL OF MY WINDOWS AND NAMES STORES THEM INTO A COMBO BOX....it works great but one thing i want to make it do is
if i run the code twice..to not list the windows that are already in it...and also i want to make another code that will clear all of the window names in the CB Box...thanks for the help hope this helps if not ill be here lol
#2
To clear combo box
Macro
Code:
Copy      Help
SendMessage dd CB_RESETCONTENT 0 0

CB_RESETCONTENT, CB_ADDSTRING and other messages are documented in MSDN Library on the internet.
#3
Function dialog
Code:
Copy      Help
ARRAY(int) a
GetWindowList 0 0 1|4 0 0 a
int i
int h
int g = ""
for i 0 a.len
,h=a[i]
,if(!wintest(h "" "ATL:007C37C8")) continue
,str s.getwintext(h)
,int dd=id(13 "dialog")
,SendMessage dd CB_RESETCONTENT 0 0  ;;;i tried to add it right here but it didnt work. it would only add one window but didnt add the others or duplicate any as well.
,SendMessage dd i 0 0
,SendMessage dd CB_ADDSTRING 0 s

this is what i tried...basically the way it is everytime i hit button 13 it adds the same windows that are already in the CB Box. I tried this as shown above


Forum Jump:


Users browsing this thread: 1 Guest(s)