add function to remove extra empty lines from ini when writing

This commit is contained in:
David Daily 2020-01-14 10:53:05 -06:00
parent 64d7d9dc0a
commit ace6f712cd
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ ini_writeValue(location, inKey, inValue)
needle := inKey . "=.*"
replacement := inKey . "=" . inValue
tempini := RegExReplace(tempini, needle, replacement,, 1)
tempini := RegExReplace(tempini, "\R+\R", "`r`n")
WinWaitNotActive, GloVar.ini
FileAppend, %tempini%, tempini ; Append the fixed ini to a new file
FileCopy, tempini, %location%, 1 ; Copy the file over, overwriting existing contents