Page 1 of 1

Reading contents of multi-lined text file when installing.

Posted: Mon Jul 06, 2009 12:08 pm
by albel
Hi,

I have a need to read a short text file and display its contents in an install dialog at runtime.
I thought the 'Read From Text File' statement would do this, but it only reads one line - the file has more than one line.
It seems the Memo control has an abililty to read its contents from a text file, prenamed either ReadMe or License Agreement. But I think this is not a runtime capability and the file name will not be known before installing.
Is there a way to read the contents of a multi-lined text file during the installation?

Thanks in advance.

Posted: Mon Jul 06, 2009 2:03 pm
by MichaelNesmith
Pressing F1 in the IDE can be a good thing ;)
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.

Re. Read contents of multi-lined text file when installing.

Posted: Mon Jul 06, 2009 3:45 pm
by albel
Hi Michael,

Thanks for the pointer.
I'm somewhat embarrassed. Now that I re-read the help entry, the quote is right there on the documentation page!! I must not have scrolled far enough and missed it before.

Sorry to have wasted your time on this item.

albel