spyrorocks Posted October 18, 2006 Share Posted October 18, 2006 Hello. I need some help sorting an array. I have tryed _arraysort() but it dident work i have a ini file that looks like this: [hello] 2=fsddfsd 4=dvvdsv 1=dvsvdvsdv 9=ccdvvsd what i need to do is use IniReadSection () to read the ini sections then i need to somehow sort the array so that the highest key value is at the beginning and the lowest is at the end. How would i do that? [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
Cue Posted October 18, 2006 Share Posted October 18, 2006 Thats odd. ive never used _arraysort but from the documentation i dont see why it wouldnt work what parameters did you use. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 18, 2006 Developers Share Posted October 18, 2006 This should get you started: #include<array.au3> $array=IniReadSection("test.ini","hello") _ArraySort($array,1,1,0,2,0) For $x = 1 to $array[0][0] MsgBox(0,"record:"& $x,"field 1:" & $array[$x][0] & " field 1:" & $array[$x][1]) Next SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
spyrorocks Posted October 18, 2006 Author Share Posted October 18, 2006 Thank you so much! [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] 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