Shyke Posted February 1, 2006 Posted February 1, 2006 I was wondering how to "Read all running programs and get thier window names." for a security program but I am unsure of how to do this. Could anyone point me in a direction?
DarkNecromancer Posted February 2, 2006 Posted February 2, 2006 So you just want to get the titles of all the running programs?? i think this should work:CODELocal $List = WinList() Local $Title = "" For $i = 1 To $List[0][0] ;uncomment to show all visible programs ;If $List[$i][0] <> "" And IsVisible($List[$i][1]) Then ;uncomment to show all programs If $List[$i][0] <> "" Then Dim $Process = IDtoName( WinGetProcess($List[$i][0])) $Title &= $Process & @TAB & $List[$i][0] & @CRLF EndIf Next msgbox(0,"",$Title) Func IDtoName($Handle) Dim $ProcList = ProcessList() For $i = 1 To $ProcList[0][0] If $ProcList[$i][1] = $Handle Then Return ($ProcList[$i][0]) EndIf Next EndFunc Func IsVisible($Handle) If BitAND( WinGetState($Handle), 2) Then Return 1 Else Return 0 EndIf EndFunc And if u wanted to get the text of the window you could just add a wingettext where the $title &= is. Hope that helps ~Dark
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now