DataType:iniadvfilesection

From the wonderful RedGuides Wiki

Returns information on sections within an ini file


This Data Type is added by core MacroQuest.
iniadvfilesection is used as a return type by these members:  [ Toggle ]

Page Member Description
iniadvfile Section Access the type without a specific section named.
Section[<name>] Access a specific section of the ini file.

Members

Type Member Description
bool Exists Whether a specified section exists
iniadvfilesectionkey Key Access members of the key datatype
Key[<name>] Access to a specific key
int Count How many sections exist. If a section is specified, how many matching the given name exist.

Examples

If sample.ini contains:

[SectionOne]
key1=foo
key2=bar
[SectionTwo]
key1=baz
key3=duplicate
key3=foobar

And you type...

/echo ${Ini.File[sample.ini].Section.Count}

returns "2"

/echo ${Ini.File[sample.ini].Section[SectionTwo].Exists}

returns "TRUE"

See also