Page 1 of 1

How to leave a blank line in INI file

Posted: Tue Jul 29, 2008 6:22 pm
by Jeff Barnes
Hi Everybody,

When creating an INI file, how can I leave a blank line before the next section?

This is what I get now:

[REPORTS]
Doc_Name_Pos=0
Abg_Chart=0
[BACKUP]
Backup_Days=30
Backup_Date=29/07/2008

I would like to have:

[REPORTS]
Doc_Name_Pos=0
Abg_Chart=0

[BACKUP]
Backup_Days=30
Backup_Date=29/07/2008


It just makes it a bit easier to find things :D

Posted: Tue Jul 29, 2008 7:34 pm
by JC
Hi Jeff.

I think this is not possible with the class or function. You must be change the file manually for this!

The file WIN.INI and the must of them don't have a blank line between sections

Code: Select all | Expand

; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1
[MCI Extensions.BAK]
aif=MPEGVideo
aifc=MPEGVideo
aiff=MPEGVideo
asf=MPEGVideo
asx=MPEGVideo
au=MPEGVideo
m1v=MPEGVideo
m3u=MPEGVideo
mp2=MPEGVideo
mp2v=MPEGVideo
mp3=MPEGVideo
mpa=MPEGVideo
mpe=MPEGVideo
mpeg=MPEGVideo
mpg=MPEGVideo
mpv2=MPEGVideo
snd=MPEGVideo
wax=MPEGVideo
wm=MPEGVideo
wma=MPEGVideo
wmv=MPEGVideo
wmx=MPEGVideo
wpl=MPEGVideo
wvx=MPEGVideo
m2v=MPEGVideo
mod=MPEGVideo
[MSUCE]
Advanced=0
CodePage=Unicode
Font=Arial
[FoxyTunesWMP]
MessageBoxAnswer=0


But, exists too the class TReg32(), I think it's very better than using ini files.

Blanks in INI

Posted: Tue Jul 29, 2008 9:05 pm
by ukoenig
Hello,
why not to create empty Entry-sections
with different point-positions ( no to be used )

sample :

Code: Select all | Expand


[REPORTS]
Doc_Name_Pos=0
Abg_Chart=0
[ .                  ]
[BACKUP]
Backup_Days=30
Backup_Date=29/07/2008
[  .                 ]



A point is not much visible.

Best Regards
Uwe :lol:

Re: How to leave a blank line in INI file

Posted: Tue Jul 29, 2008 10:53 pm
by mmercado
Jeff Barnes wrote:When creating an INI file, how can I leave a blank line before the next section?
Hi Jeff:

Why don't create the ini file for the first time with No Entry Sections:

Code: Select all | Expand

cIni := "[REPORTS]" + CRLF + CRLF + "[BACKUP]" + CRLF + CRLF + "[MORE]"
MemoWrit( "your.ini", cIni )
Regards.

Manuel Mercado

Posted: Wed Jul 30, 2008 1:40 am
by Jeff Barnes
Thanks everybody.