Sign in to follow this  
Followers 0
Shyke

Read all running programs and get thier window names...

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



So you just want to get the titles of all the running programs?? i think this should work:

CODE
Local $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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0