IniFileWrite - method of object Pm

Writing the item into the *.ini file.
IniFileWrite(sFile As String, sSection As String, sKey As String, vWrite As Variant) As Boolean
b = Pm.IniFileWrite(sFile, sSection, sKey, vWrite)
sFile(String) The file name with the path. If a full path is not entered, then it is completed relatively according to the application file folder.

It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

sSection(String) Section name (the section is in INI file in the brackets) without the brackets
sKey(String) Key name of the written item
vWrite(Variant) Written value
Return Values:
true - on success
false - on error
This way of storing the values is appropriate for the portion store of single configurations or for the store of only a few values. It is not suitable for the real-time store of bigger amount of values because the operation is slow (internally the entire INI file has to be read, the key searched, overwritten and the entire INI file saved). The operation must be applied for each item (for each key value) separately. For the store of bigger amount of values it is better to use, for example, the Pm.FileTextWrite method where the output format can be identical with the INI file, only data are written together.
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
VBScriptSelect and copy to clipboard

Pm.IniFileWrite "#cfg:file.ini", "Data", "Value1", "4.56"
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- IniFileWrite
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice