Sign in to follow this  
Followers 0
Aceguy

Inisort via 3rd element.?

5 posts in this topic




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.

I have the same question.

Thanks,

Share this post


Link to post
Share on other sites

IniRead will return "a|12|33|30" which you could then breakup using StringSplit($string, "|"). You can then use _ArraySort to sort them.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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,

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  
Followers 0