B3TA_SCR1PT3R Posted October 4, 2005 Share Posted October 4, 2005 how would i list a group of numbers from low to high. and not knowing the numbers. like in: ProcessList() [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2005 Share Posted October 4, 2005 (edited) PROCESS LIST RETURNS A TWO DIMENSIONAL ARRAYTHIS TOPIC PERTAINS TO SORTING BY THE SECOND DIMENSIONhttp://www.autoitscript.com/forum/index.ph...st=0&p=1107548) Edited October 4, 2005 by Valuater Link to comment Share on other sites More sharing options...
flyingboz Posted October 4, 2005 Share Posted October 4, 2005 (edited) how would i list a group of numbers from low to high. and not knowing the numbers. like in:ProcessList()Processlist returns an array you have to iterate through toif $pl = Processlist(), then Dim $pl_sorted[$pl[0]+1][2] and iterate using your favorite sorting algorithm.There are also a bunch of _Array* UDFs that you may wish to investigate.Or slap it into one of the gui controls that sorts by default, then read the results back out sorted for you.i.e. $pl = ProcessList() for $i = 1 to $pl[0][0] ;append $pl[$i][0] to listbox for names ;append $pl[$i][1] to add pids ;these would be guictrlsetdata() calls ? -don't have the gui stuff on the top of my head next ; get datacontrol contents - guictrlgetdata() ? Edited October 4, 2005 by flyingboz Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted October 4, 2005 Author Share Posted October 4, 2005 oh didnt relize there was an array for sorting..i hate arrays never used em [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
/dev/null Posted October 4, 2005 Share Posted October 4, 2005 how would i list a group of numbers from low to high. and not knowing the numbers. like in:ProcessList()Actually I don't understand the problem. I can only guess: Use an array and loop through it or use _ArrayDisplay(). If you want to list them from low to high, you'll have to sort the array.#include <Array.au3> Dim $avArray[5] $avArray[0] = 8 $avArray[1] = 39 $avArray[2] = 1 $avArray[3] = 18 $avArray[4] = 22 _ArrayDisplay( $avArray, "Unsorted" ) _ArraySort( $avArray) _ArrayDisplay( $avArray, "Sort Ascending" )CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2005 Share Posted October 4, 2005 (edited) Actually I don't understand the problem. I can only guess: Use an array and loop through it or use _ArrayDisplay(). If you want to list them from low to high, you'll have to sort the array.#include <Array.au3> Dim $avArray[5] $avArray[0] = 8 $avArray[1] = 39 $avArray[2] = 1 $avArray[3] = 18 $avArray[4] = 22 _ArrayDisplay( $avArray, "Unsorted" ) _ArraySort( $avArray) _ArrayDisplay( $avArray, "Sort Ascending" )CheersKurtTHE ARRAY THAT IS RETURNED BY PROCESSLIST IS TWO DIMENSIONAL8) Edited October 4, 2005 by Valuater Link to comment Share on other sites More sharing options...
flyingboz Posted October 4, 2005 Share Posted October 4, 2005 THE ARRAY THAT IS RETURNED BY PROCESSLIST IS TWO DIMENSIONAL@ValuaterSo you've said repeatedly AND LOUDLY. It's just a variable. Please GET A NEW KEYBOARD, yours ONLY TYPES L337 and ALL CAPS. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2005 Share Posted October 4, 2005 @ValuaterSo you've said repeatedly AND LOUDLY. It's just a variable. Please GET A NEW KEYBOARD, yours ONLY TYPES L337 and ALL CAPS.i'm at an internet store in mexico8) 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