Populate List Box from text file

Got a problem you cannot solve? Try here.
tfosorcim
Posts: 10
Joined: Mon Jan 09, 2017 1:25 pm

Populate List Box from text file

Postby tfosorcim » Mon Jan 30, 2017 10:15 am

Howdy,

I am trying to add a listbox containing the IP Addresses for a particular system, and wrote a script to generate the IP Addresses.

My installer code runs the script and then reads text file output to a variable, to get the IP Addresses into the listbox.

For some reason, the listbox is only seeing the first entry when I write it to a variable and read it from the MessageBox and the Listbox item list...

Any ideas?

The text file is attached (unaltered) from my testing system as well as a screenshot of my installer code.

Steven
Attachments
ipaddresses.txt
(28 Bytes) Downloaded 264 times
listbox.png
listbox.png (13.76 KiB) Viewed 4089 times

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Populate List Box from text file

Postby FrancescoT » Mon Jan 30, 2017 2:57 pm

Dear Steven,

for what I see your TXT file uses ANSI format, while recent InstallAware versions support UNICODE only.

I suggest you to try with storing your TXT as UNICODE ... this should solve the issue.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

tfosorcim
Posts: 10
Joined: Mon Jan 09, 2017 1:25 pm

Re: Populate List Box from text file

Postby tfosorcim » Mon Jan 30, 2017 7:08 pm

Howdy,

I have tried Unicode file formatting, and not had any better luck...

Here's a screenshot of a test Project with Both Ansi and Unicode files...

I would have thought the Unicode File would have looked better... but apparently not..

Something else must be wrong as well.. also?

I am writing a /r/n at the end of the lines.. Is that incorrect as well? I tried with just with a /n only and that didnt seem to help either.

Steven
Attachments
ipaddresses-unicode.txt
(56 Bytes) Downloaded 251 times
ipaddresses-ansi.txt
(28 Bytes) Downloaded 242 times
ansi-unicode.png
ansi-unicode.png (12.87 KiB) Viewed 4080 times

tfosorcim
Posts: 10
Joined: Mon Jan 09, 2017 1:25 pm

Re: Populate List Box from text file

Postby tfosorcim » Mon Jan 30, 2017 7:14 pm

P.S. Just read this from the help file.... for "Read From Text FIle"

This command helps you read a single line of text from a text file. Unicode files are not supported.

tfosorcim
Posts: 10
Joined: Mon Jan 09, 2017 1:25 pm

Re: Populate List Box from text file

Postby tfosorcim » Mon Jan 30, 2017 7:22 pm

and 2 more points are awarded to the help file.... when I finally "read it all"

.....Prefix the path specified in the Read from File field using the special sequence #READALL\ if you wish to read in the entire file, instead of just the first line of the file. Lines in entire files read this way will be separated using the $NEWLINE$ variable.

Probelm solved. Thank you for your responses to my "noob"-iness

Steven
Attachments
ansi-unicode.png
ansi-unicode.png (15.86 KiB) Viewed 4080 times

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Populate List Box from text file

Postby FrancescoT » Wed Feb 01, 2017 6:51 am

Happy you solved!

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 55 guests