Jump to content

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


Recommended Posts

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

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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]
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...