GetINISetting

Purpose

Returns the value associated with the requested key from an INI file.

Parameters

Parameter: section
Type: string
Description: Name of section in INI file to get,such as "Settings" for the HomeSeer settings section.

Parameter: key
Type: string
Description: Name of the key in the INI file to access.

Parameter: default
Type: string
Description: The default value to return if the key is not found.

Parameter: filename
Type: string (optional)
Description: The file name of the INI file to access.  The file name is relative to the "config" folder in the HomeSeer program directory (C:\Program Files\HomeSeer 2\Config by default).  If this parameter is omitted, the HomeSeer settings.ini file is used.

Returns

Return value: ini key value
Type: string

Example

GetINISetting Script Example