/* Config functions Parent: SteamLab, Settings */ Config(_Action="") { local NewConfig, Result If Not _Action _Action := configSections ? "write" : "read" If (_Action = "read") { FileCopy,%DefaultsDir%\config.ini.default, %ConfigFile%, 0 configSections := Ini_GetSectionNames(ConfigFile) Ini_LoadKeys(ConfigFile, "", 0, "cfg_") } Else If (_Action = "write") { If configSections { Loop, Parse, configSections, `n { NewConfig .= "[" . A_LoopField . "]`n" . Ini_MakeSection("cfg_" . A_LoopField . "_") . "`n`n" Sleep, 10 } If NewConfig { FileDelete, %ConfigFile% FileAppend, %NewConfig%, %ConfigFile% } } } Return 1 }