Sign in to follow this  
Followers 0
DjDeep00

Group Elements in Array

5 posts in this topic

I having the following array:

|A|400|13|UNIT

|A|400|51|UNIT

|B|400|52|UNIT

|C|200|38|UNIT

|C|200|40|UNIT

|D|1700|4|TN

|D|100|2|TN

|D|100|1|UNIT

|D|200|40|UNIT

|E|400|63|LNP

|F|1800|1|LNP

|F|100|2|LNP

I would like to make a new array by grouping the letters.

Example:

|A|400|13|UNIT@|A|400|51|UNIT

|B|400|52|UNIT

|C|200|38|UNIT@|C|200|40|UNIT

|D|1700|4|TN@|D|100|2|TN@|D|100|1|UNIT@|D|200|40|UNIT

and so on so on.....

Not sure where to start....

Share this post


Link to post
Share on other sites



Your setup is confusing... are you saying you currently have a 4 dimensional array, and you want to make it an unlimited dimensional array?

Do you have an actual code example of the arrays?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Your setup is confusing... are you saying you currently have a 4 dimensional array, and you want to make it an unlimited dimensional array?

Do you have an actual code example of the arrays?

Sorry for the confusion. I am basically reading one txt file which has the following data:

|A|400|13|UNIT

|A|400|51|UNIT

|B|400|52|UNIT

|C|200|38|UNIT

|C|200|40|UNIT

|D|1700|4|TN

|D|100|2|TN

|D|100|1|UNIT

|D|200|40|UNIT

|E|400|63|LNP

|F|1800|1|LNP

|F|100|2|LNP

I want to read this data into an array (Each line is an element).

Then group the entire array like the following:

|A|400|13|UNIT@|A|400|51|UNIT

|B|400|52|UNIT

|C|200|38|UNIT@|C|200|40|UNIT

|D|1700|4|TN@|D|100|2|TN@|D|100|1|UNIT@|D|200|40|UNIT

Thanks

Share this post


Link to post
Share on other sites

Little Help? Anyone? SmOke_N?

Share this post


Link to post
Share on other sites

Little Help? Anyone? SmOke_N?

Your question still doesn't make sense to me. The first part does, but what you want to do doesn't. Arrays can only have a max of 64 subscripts, and it looks like from what you are doing, you have no idea how many subscripts you want.

You're example isn't very explaining, maybe show (in code) how you want this to work (doesn't have to work, just would like to see what you had in mind).


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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