# Function Reference

IniRead

Reads a value from a standard format .ini file.

IniRead ( "filename", "section", "key", "default" )

Parameters

filename | The filename of the .ini file.
section | The section name in the .ini file.
key | The key name in the in the .ini file.
default | The default value to return if the requested key is not found.

Return Value

Success: | Returns the requested key value.
Failure: | Returns the default string if requested key not found.

Remarks

A standard ini file looks like:
[SectionName]
Key=Value

Related

IniDelete, IniWrite, FileReadLine, IniReadSection, IniReadSectionNames, IniRenameSection

Example

$var = IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound")
MsgBox(4096, "Result", $var)