SjaakTV Posted March 29, 2010 Posted March 29, 2010 Hi, so I want to make a easy script that checks all running proces and puts them in a .txt file. I start of with checking how. $list = ProcessList() for $i = 1 to $list[0][0] msgbox(0, $list[$i][0], $list[$i][1]) next Autoit gives me this. It shows all proces in a msg. The problem with this for me is the $list[0][0], $list[$i][0], $list[$i][1] i don't realy get that. So i made this. $Proces = ProcessList() $a = GUICtrlRead($Proces) $file1 = FileOpen("proces.txt", 1) FileWriteLine($file1, $a) FileClose($file1) Bad thing is it keeps droping a 0 in the textfile idk why. I thought it might drop 1 all processes or atleast one but a 0 why/how?
Steveiwonder Posted March 29, 2010 Posted March 29, 2010 (edited) Like this? $fname = "processes.txt" $file = FileOpen($fname, 9) $list = ProcessList() for $i = 1 to $list[0][0] FileWriteLine($file, "Process Name: " & $list[$i][0] & " PID: " & $list[$i][1] & @CRLF) next FileClose($file) Edited March 29, 2010 by Steveiwonder They call me MrRegExpMan
SjaakTV Posted March 29, 2010 Author Posted March 29, 2010 This is the proces name= $list[$i][0] This is the proces number = $list[$i][1] Thnx man now i get it.
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