Write-Key-Value
Command Description
Write a given key-value pair under a given section of the INI file. If the INI file or section name does not exist, the pair is automatically created
Command Prototype
INI.Write(sFile, sSection, sKey, sValue)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sFile | True | path | '''C:\Users''' | The path of the INI file |
sSection | True | string | "" | Name of the section of the .ini file |
sKey | True | string | "" | The key name of written key-value pair in INI file. If it is an empty string, the key-value pair will not be entered |
sValue | True | string | "" | The key-value pair to be written to the INT file |
Demo
/************************************Write key value*********** ****************************
Command prototype:
INI.Write('''C:\Users''', "", "", "")
Input parameters:
sFile--path where the INI configuration file is located
sSectuion--The name of the section to access the INI configuration file
sKey--The key name in the key-value pair written in the INI file, if it is an empty string, the key-value pair will not be written
sValue--The key value in the key-value pair written in the INI file
Outgoing parameters:
None
********************************************************************************/
Dim sFile='''C:\Users\Chance\Desktop\testINI\data.ini'''
Dim sSection="RPA"
Dim sKey="Controller"
Dim sValue="Order"
INI.Write(sFile,sSection,sKey,sValue)