The fact is that the text I have goes one after the other:
[Nancy Data]
CDDrive1=C:
CDDrive2=C:
HDDrive=C:
IDPath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать
CifTreePath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать\ciftree\
HDVideoPath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать\HDVideo\
CDVideoPath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать\CDVideo\
HDSoundPath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать\HDSound\
CDSoundPath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать\CDSound\
LoadSavePath=\Program Files (x86)\My Program\Нэнси Дрю. Секреты могут убивать\Save\
RunEntirelyFromCDDrive=0 ; 1=run all app from cdrom, 0=run normal
CifTreeAndFilesOnCD=0 ; 1=all cif/tree files on CDROM, 0=tree on hard drive
TestingModeEnabled=0 ; 1=enable test-only mode, 0=not enabled
ExternalCifFileChecking=1 ; 1=look for cif files external to tree, 0=don't look
DebugOutput=1 ; 1=enable debug output (huge), 0=not enabled
RunInWindowedMode=0 ; 1=run in a window, 0=run full-screen exclusive mode
MaxXAxisTravelPerMove=195 ; max x travel per render loop
MaxYAxisTravelPerMove=150 ; max y travel per render loop
SoundSystemIsActive=1 ; 1=sound, 0=no sound
ForceSoundBufSize=0 ; 0=use default, 1=force size
SoundBufSize=4096 ; size used if forced
SoundBufSkip=6 ; raise if sound skips, lower if video not synching
UseDirectSound=1 ; 0=MME, 1=DirectSound
ClosedCaptioning=1
PlayerSpeech=1
CharacterSpeech=1
VoiceMasterVolume=54
MusicMasterVolume=54
SpecialEffectsMasterVolume=51
SwapLeftAndRightSoundChannels=0
PrimaryVideoNonSoundTimeDelay=300
PrimaryVideoNonSoundFrameTime=66
SystemQualityForPrimaryVideo=0
InstallationType=0
PlayerWonTheGame=StillWorkingOnIt
; 640x480 aspect=1.33 : 1
And I need to format the INI file by inserting empty lines between key groups:
[Nancy Data]
CDDrive1=E:\
CDDrive2=E:\
HDDrive=E:
IDPath=\games\Нэнси Дрю. Секреты могут убивать
CifTreePath=\games\Нэнси Дрю. Секреты могут убивать\ciftree\
HDVideoPath=\games\Нэнси Дрю. Секреты могут убивать\HDVideo\
CDVideoPath=\games\Нэнси Дрю. Секреты могут убивать\CDVideo\
HDSoundPath=\games\Нэнси Дрю. Секреты могут убивать\HDSound\
CDSoundPath=\games\Нэнси Дрю. Секреты могут убивать\CDSound\
LoadSavePath=\games\Нэнси Дрю. Секреты могут убивать\Save\
RunEntirelyFromCDDrive=0 ; 1=run all app from cdrom, 0=run normal
CifTreeAndFilesOnCD=0 ; 1=all cif/tree files on CDROM, 0=tree on hard drive
TestingModeEnabled=0 ; 1=enable test-only mode, 0=not enabled
ExternalCifFileChecking=1 ; 1=look for cif files external to tree, 0=don't look
DebugOutput=1 ; 1=enable debug output (huge), 0=not enabled
RunInWindowedMode=0 ; 1=run in a window, 0=run full-screen exclusive mode
; 640x480 aspect=1.33 : 1
MaxXAxisTravelPerMove=195 ; max x travel per render loop
MaxYAxisTravelPerMove=150 ; max y travel per render loop
SoundSystemIsActive=1 ; 1=sound, 0=no sound
ForceSoundBufSize=0 ; 0=use default, 1=force size
SoundBufSize=4096 ; size used if forced
SoundBufSkip=6 ; raise if sound skips, lower if video not synching
UseDirectSound=1 ; 0=MME, 1=DirectSound
ClosedCaptioning=1
PlayerSpeech=1
CharacterSpeech=1
VoiceMasterVolume=54
MusicMasterVolume=54
SpecialEffectsMasterVolume=51
SwapLeftAndRightSoundChannels=0
PrimaryVideoNonSoundTimeDelay=300
PrimaryVideoNonSoundFrameTime=66
SystemQualityForPrimaryVideo=0
InstallationType=0
PlayerWonTheGame=StillWorkingOnIt
I am creating an INI file using the INI section:
[INI]
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CDDrive1"; String: "{drive:{src}}"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CDDrive2"; String: "{drive:{src}}"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "HDDrive"; String: "{drive:{src}}"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "IDPath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CifTreePath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать\ciftree\}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "HDVideoPath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать\HDVideo\}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CDVideoPath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать\CDVideo\}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "HDSoundPath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать\HDSound\}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CDSoundPath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать\CDSound\}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "LoadSavePath"; \
String: "{code:RemoveDrive|{app}\Нэнси Дрю. Секреты могут убивать\Save\}"; \
Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "RunEntirelyFromCDDrive"; String: "0 ; 1=run all app from cdrom, 0=run normal"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CifTreeAndFilesOnCD"; String: "0 ; 1=all cif/tree files on CDROM, 0=tree on hard drive"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "TestingModeEnabled"; String: "0 ; 1=enable test-only mode, 0=not enabled"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "ExternalCifFileChecking"; String: "1 ; 1=look for cif files external to tree, 0=don't look"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "DebugOutput"; String: "1 ; 1=enable debug output (huge), 0=not enabled"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "RunInWindowedMode"; String: "0 ; 1=run in a window, 0=run full-screen exclusive mode"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "; 640x480 aspect"; String: "1.33 : 1"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "MaxXAxisTravelPerMove"; String: "195 ; max x travel per render loop"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "MaxYAxisTravelPerMove"; String: "150 ; max y travel per render loop"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "SoundSystemIsActive"; String: "1 ; 1=sound, 0=no sound"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "ForceSoundBufSize"; String: "0 ; 0=use default, 1=force size"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "SoundBufSize"; String: "4096 ; size used if forced"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "SoundBufSkip"; String: "6 ; raise if sound skips, lower if video not synching"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "UseDirectSound"; String: "1 ; 0=MME, 1=DirectSound"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "ClosedCaptioning"; String: "1"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "PlayerSpeech"; String: "1"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "CharacterSpeech"; String: "1"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "VoiceMasterVolume"; String: "54"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "MusicMasterVolume"; String: "54"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "SpecialEffectsMasterVolume"; String: "51"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "SwapLeftAndRightSoundChannels"; String: "0"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "PrimaryVideoNonSoundTimeDelay"; String: "300"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "PrimaryVideoNonSoundFrameTime"; String: "66"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "SystemQualityForPrimaryVideo"; String: "0"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "InstallationType"; String: "0"; Flags: createkeyifdoesntexist
Filename: "{app}\game.ini"; Section: "Nancy Data"; Key: "PlayerWonTheGame"; String: "StillWorkingOnIt"; Flags: createkeyifdoesntexist
I found the Format
function with this example:
var
S: String;
I: Integer;
begin
S := Format('%d files found', [10]);
// S = '10 files found'
S := Format('Filename: %s', ['file.txt']);
// S = 'Filename: file.txt'
I := 64;
S := Format('%d in hex, padded to 8 digits: %.8x', [I, I]);
// S = '64 in hex, padded to 8 digits: 00000040'
end;
But I didn't understand how I could use it.