Sign in to follow this  
Followers 0
asiawatcher

HOW TO SPLIT AN ARRAY WITH ANYWHERE FROM 20 TO 100 ENTRIES TO SMALLER ARRAYS THAT EACH HAS 28 ENTRIES?

4 posts in this topic

hi all like the title says i got an array that is created from comma seperated values from some string

that strign can have anywhere from 20 oir morew comma seperated values i split them and i put each into the array

how can i have another array named array2 that takes only 28 entries plus 28 entries plus 28 entries from the above array each time ?

for example if the above array1 has numebrs 1,2,3,4,5,6,7,8,9.....40 to have another array2 that does the following

array2 = 1.2.3.4....29 | 30...40

and if array1 has more numbers like from 1 to 70 array 2 to group them into 3 groups

array2 = 1...29 30....59 60...70

im very confused on how to do this

this is my array1 for now

Local $iMax

Local $i

Local $data=GUICtrlRead($box)

; The string in data will be split into an array everywhere comma is encountered

Local $arr = StringSplit($data, ",")

If IsArray($arr) Then

Local $iMax = UBound($arr)

i want to display 29 items of array1 at the time and then 29 next and then the 29 next etc etc etc

cheers

Share this post


Link to post
Share on other sites



Why do you want to create a second array with 29 items? You already have an array with all items. Your script only needs a counter that holds the index of the first item to display. Your GUI then needs a forwar/backward button. This button then just increases/decreases the counter.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

see my first post

Share this post


Link to post
Share on other sites

You could still go and open the first 28 tracking numbers and then wait or get the data and then continue.

Btw. Having the title written in UPPERCASE is not a good thing to do.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

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