08-21-2007, 07:15 PM
instead of using the same code again and again it seems
to be clever to use some global script for the code i posted.
i use it in many triggers.
so exe.name(hwnd) or exe.title(truncate(30)) would be easier to use.
TSK_Main3
to be clever to use some global script for the code i posted.
i use it in many triggers.
so exe.name(hwnd) or exe.title(truncate(30)) would be easier to use.
TSK_Main3
out "WRONG"
str exe_title exe_path exe_name exe_class
int hwnd htb1 htb2 count1
str-- tb1 tb2
ARRAY(int)-- handles
ARRAY(int) r_handles
opt waitmsg 1
int w2=ShowDialog("TSK_Dialog2" &TSK_Dialog2 0 0 1)
int-- htb=id(3 w2)
rep
,out
,tb2="";count1=0
,if(!IsWindow(w2)) break
,GetWindowList 0 "" 0 0 0 handles
,
,for(int'i 0 handles.len)
,,hwnd=handles[i]
,,if(!IsWindowVisible(hwnd)) continue ;;exclude hidden
,,if(GetWinStyle(hwnd 1)&WS_EX_TOOLWINDOW) continue
,,if taskbar_splitter(hwnd)!=1
,,,if (exe.name!="FreeMeter")
,,,,r_handles[r_handles.redim(-1)]=handles[i]
,,,,tb2.formata("%i: %s - hwnd= %i exe= %s[]" r_handles.len-1 exe.title(15) handles[i] exe.name)
,
,handles.redim(0);r_handles.redim(0)
,out tb2
,
,out exe.title
,3