TurtlePower Posted September 2, 2024 Posted September 2, 2024 Hi Autoit Forum, I have an issue that has been hurting my head and I have no idea why it's happening or how to solve it... I am working on a function for my product organization program and I have ran into a barrier here. I am trying to list each item of a text file, from the first line to the last, to a ListBox with the following code : #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #include <File.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $List1 = GUICtrlCreateList("", 208, 96, 121, 200) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $lineCount = _FileCountLines("MugList2.txt") $i = 1 Do $linea = FileReadLine("MugList2.txt",$i) _GUICtrlListBox_AddString($List1, $linea) $i = $i + 1 Until $i = $lineCount It lists the items to the ListBox, but not in order. Here is what it looks like : Help would be greatly appreciated, hope you guys can help me figure out what is causing this bug
Solution TurtlePower Posted September 2, 2024 Author Solution Posted September 2, 2024 Wait.... it was because of $LBS_SORT. Solved.
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