Skip to main content


Command Description

Read the key value of the specified section of the INI file

Command Prototype

sRet = INI.Read(sFile, sSection, sKey, sDefault)

Parameter Description

sFileTruepath'''C:\Users'''The path of the INI file
sSectionTruestring""Name of the section of the .ini file
sKeyTruestring""Name of the key in the .ini file
sDefaultTruestring""Return default value if the INT file does not exist


sRet,The variable used to save the output of the command.


/************************************Read key value*********** **************************** 
Command prototype:
sRet = INI.Read('''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 to access the INI configuration file
sDefault--The default content returned when the INI configuration file key name does not exist
Outgoing parameters:
sRet--the result after the command is run
Dim sFile='''C:\Users\Chance\Desktop\testINI\data.ini'''
Dim sSection="RPA"
Dim sKey="Actuator"
Dim sDefault="Null"
sRet = INI.Read (sFile, sSection, sKey, sDefault)
TracePrint (sRet)