-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Petr Schreiber edited this page Mar 12, 2016
·
1 revision
You can use this module for easy use of INI files in your scripts.
Place the thinBasic_iniFile.dll
to Mod
directory inside your thinBasic installation.
Since then, you should be able to reference the module easily as:
uses "iniFile"
To make work with multiple files easier, and to avoid specifying the file name over and over again, module provides simple object: ' -- Create new variable of type IniFile Dim config As IniFile
' -- Specify which file you want to manipulate
config = New IniFile(APP_SourcePath + "settings.ini")
' -- Write key to section using single method
config.SetKey("Screen", "Width", "1920")
' -- Read key from section with default value specified
String value = config.GetKey("Screen", "Width", "1920")
' -- or just as is (for not existing returns empty string)
value = config.GetKey("Screen", "Width")
' -- List sections
String sections = config.GetSections(",")
' -- List section keys
String screenKeys = config.GetKeys("Screen", ",")
##Where to get support Please join us at the heart of ThinBASIC - at official forums. There is dedicated discussion.