Skip to main content
Skip table of contents

GetINISection

Purpose

Returns all values in the given INI section.  Each entry in the section is separated with a NULL character.


Parameters

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

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


Returns

Return value: ini section
Type: string


Example

Sample Code

VB
   Sub Main(ByVal Parms As Object)
        Dim Items() As String
        Dim Section As String

        Section = hs.GetINISection("Settings", "settings.ini")
        Items = Section.Split(Chr(0))
        If Items IsNot Nothing AndAlso Items.Count > 0 Then
            For Each s As String In Items
                If String.IsNullOrEmpty(s) Then Continue For
                hs.WriteLog("Items", s)
            Next
        End If
 
    End Sub


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.