Jump to content

Inisort via 3rd element.?


Aceguy
 Share

Recommended Posts

0=a|12|33|3000

1=a|11|32|3000

2=a|12|31|3000

is there a way to sort this inifile entry via the 3rd element, result will be. :-

0=a|12|31|3000

1=a|11|32|3000

2=a|12|33|3000

Thanks in advance.

Link to comment
Share on other sites

  • 7 months later...

I have the same question.

Thanks,

You can read them all into a 2D array with IniReadSection(),

then add additional colums to hold the split data,

split each value into the appropriate columns,

_ArraySort() on the column wanted,

reassemble the split columns into the single string for that value,

write the values back to the INI.

What have you coded so far?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You can read them all into a 2D array with IniReadSection(),

then add additional colums to hold the split data,

split each value into the appropriate columns,

_ArraySort() on the column wanted,

reassemble the split columns into the single string for that value,

write the values back to the INI.

What have you coded so far?

:)

That makes sense. I haven't coded anything yet...didn't know if this already existed or not. I'll see what I can do when I get a moment.

Thanks,

Link to comment
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
 Share

  • Recently Browsing   0 members

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