Jump to content
Sign in to follow this  

Process List Generator

Recommended Posts


#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]
$n = 1
If $sort = 0 Then
ElseIf $sort = 1 Then
_ArraySort($arrayfinal, $sort)
While $n <> $t
FileWriteLine($file, $arrayfinal[$n])

** 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.



AutoIt Smith

Edited by AutoIt Smith

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