winlist() with different items

02/03/2014 22:20 jeanoyaji#1
hello everybody, i need your help please. this is my code and i will explain my problem in it


PHP Code:
#include <MsgBoxConstants.au3>
Example()
Func Example()

    ; 
Retrieve a list of window handles.
     
Local $aList WinList("[class:PROCEXPL]")
 ; 
Loop through the array displaying only visable windows with a title.
    For 
$i 1 To $aList[0][0]
        If 
$aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2Then
          $vv 
WinGetProcess($aList[$i][1])
         
MsgBox(0,"",""&$vv)

        EndIf
    
Next
 EndFunc 
i want to get the process of more than one application ,but i want to specific the app

in my code i specified the "[class:PROCEXPL]" and i get its PID but i need to specify more than one app like this

PHP Code:
 Local $aList WinList("[class:PROCEXPL]" and "[class:MozillaWindowClas]" and "[class:PiriformCCleaner]" 
so my code will show me the PID of those applications only , but this dosen't work

thank you in advance
02/03/2014 22:56 alpines#2
Put the classnames in an array and loop WinList.
02/03/2014 23:01 jeanoyaji#3
thank you for your answer
can you give me hints of how to put the arry?
02/04/2014 08:16 lolkop#4
Code:
$list = WinList("[REGEXPCLASS:(PROCEXPL)|(MozillaWindowClass)|(PiriformCCleaner)]")
For $i=1 To $list[0][0]
	ConsoleWrite(WinGetProcess($list[$i][1])&@CRLF)
Next