Promotic
WikipediaLinkedInYoutubeTwitterFacebook

IniFileRead - method of object Pm

Description:
Reading the item from the *.ini file.
Syntax:
IniFileRead(sFile As String, sSection As String, sKey As String, vDefault As Variant, [Dt As Long]) As Variant
Calling:
x = Pm.IniFileRead(sFile, sSection, sKey, vDefault, vbLong)
Parameters:
sFile(String) file name (with the path). If a full path is not entered, 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 read item
vDefault(Variant) Value that has to be returned if reading the item fails
Dt[optional] (Long) Data type of the read value. See VBScript constants of data types. The preset value is vbString.
Note:
This method is not functional for Web Panels.
Example1:
Example of the *.ini file
[MySettings]
NmbX=0
Object=/Folder0/Timer0
[Data]
Value1=8.2
Value2=3.14
Value3=GoodBy
Example2:
Example of using the method
Val = Pm.IniFileRead("#cfg:file.ini", "Data", "Value1", "1.0", vbSingle)
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- IniFileRead
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice