Jump to content

Recommended Posts

Posted (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.

:whistle:

Peace,

AutoIt Smith

Edited by AutoIt Smith

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...