From bbfbaf40343faae9302639f4f2d97a7df08fc3e6 Mon Sep 17 00:00:00 2001 From: David Daily Date: Wed, 9 Sep 2026 14:13:29 -0500 Subject: [PATCH] Update func.ahk --- func.ahk | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/func.ahk b/func.ahk index faec437..eac93cb 100644 --- a/func.ahk +++ b/func.ahk @@ -27,19 +27,21 @@ ini_load(location) Loop { Line := temp.ReadLine() - RegExMatch(Line, "(?
(?<=\[).*(?=\]))|(?.*)=(?.*)", &r) ; Key = r.Key, Value = r.Value, Section = r.Section - If (r.Section) - { - out[r.Section] := Map() - curr_section := r.Section - } Else - { - If (curr_section) + if (Line){ + RegExMatch(Line, "(?
(?<=\[).*(?=\]))|(?.*)=(?.*)", &r) ; Key = r.Key, Value = r.Value, Section = r.Section + If (r.Section) { - out[curr_section].Set(Trim(r.Key, " `t`r`n"), Trim(r.Value, " `t`r`n")) + out[r.Section] := Map() + curr_section := r.Section } Else { - out.Set(Trim(r.Key, " `t`r`n"), Trim(r.Value, " `t`r`n")) ; this handles things with no section + If (curr_section) + { + out[curr_section].Set(Trim(r.Key, " `t`r`n"), Trim(r.Value, " `t`r`n")) + } Else + { + out.Set(Trim(r.Key, " `t`r`n"), Trim(r.Value, " `t`r`n")) ; this handles things with no section + } } } } Until (temp.AtEOF)