Please enable JavaScript to view this site.

Codolex

Navigation: Activities > IniFile

IniFile Write

Scroll Prev Top Next More

The IniFile Write activity can be used to store data in a local ini file from a variable

uses System.IniFiles.TIniFile

 

WriteIniFile

Activity properties

 

var IniFile := TIniFile.Create(IniFilePath);

try

   IniFile.WriteString('keys', 'APIKey1', keys.APIKey1);

   IniFile.WriteString('keys', 'APIKey2', keys.APIKey2);

finally

   IniFile.Free;

end;

Resulting code

 

The activity expects a path to the ini file, and variable with values to write from.

Keep in mind that all values get updated, even if a value is empty.

 

It's recommended to create an inifile datasource to get the variable to write from.

More information about the datasource: IniFile Datasource

© by GDK Software