themax90 Posted August 11, 2005 Share Posted August 11, 2005 (edited) #include <Array.au3> $file = "Processes.txt" $sort = 0 ;$file = file to save generated list to ;$sort = -1 then no sorting ;$sort = 0 then sort acsending ;$sort = 1 then sort desending $array = ProcessList() $t = $array[0][0] FileWriteLine($file, "Number of processes : " & ($t - 1)) $n = 1 Dim $arrayfinal[$t] While $n <> $t $arrayfinal[$n] = "Process : " & $array[$n][0] & " PID : " & $array[$n][1] WEnd $n = 1 If $sort = 0 Then _ArraySort($arrayfinal) ElseIf $sort = 1 Then _ArraySort($arrayfinal, $sort) EndIf While $n <> $t FileWriteLine($file, $arrayfinal[$n]) WEnd** FIXED ** just realized that the first number [0][0] in the array is number of files so made $n = 1 to accomidate!Hope you like, just a small utility for those who wish.Peace,AutoIt Smith Edited August 11, 2005 by AutoIt Smith Link to comment Share on other sites More sharing options...
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