PDA

View Full Version : Tip: Creating paragraphs from an INI file


Lavrendi
10-29-2003, 10:42 PM
I found a cool way to get INI line, insert any number of paragraph marks and put the result in a multiline texbox.

I searched on the forum for such thing and found nothing, so I think posting it is okay in case somebody requires it.

in INI file:
[Section]
Desc1=This is first line;;this is second line;;;;third line
...

Then:

%Desc1% = INIFile.GetValue ("%SrcDir%\AUTORUN.INI", "Section", "Desc1")
%Paragraph% = " "
%Desc1% = String.Replace ("%Desc1%", ";;", "%Paragraph%")
TextBoxObject[Description].SetText ("%Desc1%")

Be sure to create a %Paragraph% variable that has a paragraph mark in it!

Result, of course:

This is first line
this is second line

third line

Corey
10-29-2003, 10:43 PM
Cool tip Lavrendi!

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)