waardd Posted July 4, 2012 Share Posted July 4, 2012 Hi there,Im stumbling upon a problem.I have a file with several arrayentrys wich i load in to my arry with a function. But when i read thge array with the combobox it displays only a part of the lines?I have a total of 677 lines and the last entry in my combo is line 524File to read:[sERVERLIJST]key1=aardslang rbf (A)|AIX|A|rbf|aardslang.mydomain...key677=xat1 ssox (O)|AIX|O|ssox|xat1.mydomainMy functions to load array and send array to combo are:Func _populateARRAY() ; Get the entries Local $srvREAD = IniReadSection("c:\mvdd\settings\serverlijst.ini", "SERVERLIJST") ; Size the Global array correctly Global $ASservers[$srvREAD[0][0] + 1][6] ; Declare this Local array outside the loop Local $srvREAD2 For $i = 1 To $srvREAD[0][0] ; Split the delimited string into an array $srvREAD2 = StringSplit($srvREAD[$i][1], "|") ; Now add the elements to the Global array For $j = 1 To $srvREAD2[0] $ASservers[$i][$j] = $srvREAD2[$j] Next Next EndFunc ;==>_populateARRAY Func _FillCombo() $sServer_Data = "" For $i = 1 To UBound($ASservers) - 1 $sServer_Data &= "|" & $ASservers[$i][1] Next GUICtrlSetData($Cmb_Servers, $sServer_Data) EndFuncMy combois formatted as:$Cmb_Servers = GUICtrlCreateCombo("Cmb_Servers", 90, 15, 160, 25, BitOR($CBS_DROPDOWNLIST,$WS_VSCROLL, $CBS_SORT)) Link to comment Share on other sites More sharing options...
water Posted July 4, 2012 Share Posted July 4, 2012 You might have been hit by the 32k limit of InIReadSection: "Only the first 32767 chars are read for legacy reasons." Insert _ArrayDisplay($srvRead)afterLocal $srvREAD = IniReadSection("c:mvddsettingsserverlijst.ini", "SERVERLIJST")and see what you get. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
waardd Posted July 4, 2012 Author Share Posted July 4, 2012 What i get is the first 524 lines of my list. If i'm correct its 33274 characters in total (including the keynn=).... so it could be that it is running into a limitation... Damn...... Any suggestions? Link to comment Share on other sites More sharing options...
hannes08 Posted July 4, 2012 Share Posted July 4, 2012 Use _FileReadToArray in combination with StringSplit. Or a simple FileReadLine Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
water Posted July 4, 2012 Share Posted July 4, 2012 (edited) Give a try. It handles INI files without the 32K limitation. Edited July 4, 2012 by water BrewManNH 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
waardd Posted July 4, 2012 Author Share Posted July 4, 2012 Thanks to Water!!! That UDF did the trick. It read the complete file!!! Tnx Link to comment Share on other sites More sharing options...
water Posted July 4, 2012 Share Posted July 4, 2012 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now