Waldo
08-19-2008, 09:29 AM
I have examined just about every listbox example that I can find and I am still stuck. What I want to do is populate a listbox from a text file. The text file will have two items per line.
The first item in the line is the text that I want to appear in the listbox. The second item is the filename to be opened when the user double clicks the item [they all are either a pdf or doc file]. I can delimit the text file with any symbol and I have using a "|" as this was the easiest symbol to use from the sub-system that is generating the text file.
Text File Example [myFiles.txt]:
John Smith|12345.pdf
Wilbur Wood|45433.doc
Jane Doe|5677.pdf
Martha Brown|56666543.doc
I have figured out how to search for the "|" character using LUA....What I can't figure out is how to script that everything to the left of the "|" is the item to display in the text box and everything to the right of the "|" is the full file name.
I know this is probably a stupid question, but after 5 hours of examining every lisbox that I could get my hands on....well, I still can't get it to work....Maybe I can't proceed using this logic process or I have made it much too complicated. :huh Thanks for your patience...:yes
The first item in the line is the text that I want to appear in the listbox. The second item is the filename to be opened when the user double clicks the item [they all are either a pdf or doc file]. I can delimit the text file with any symbol and I have using a "|" as this was the easiest symbol to use from the sub-system that is generating the text file.
Text File Example [myFiles.txt]:
John Smith|12345.pdf
Wilbur Wood|45433.doc
Jane Doe|5677.pdf
Martha Brown|56666543.doc
I have figured out how to search for the "|" character using LUA....What I can't figure out is how to script that everything to the left of the "|" is the item to display in the text box and everything to the right of the "|" is the full file name.
I know this is probably a stupid question, but after 5 hours of examining every lisbox that I could get my hands on....well, I still can't get it to work....Maybe I can't proceed using this logic process or I have made it much too complicated. :huh Thanks for your patience...:yes