From ace6f712cdc9de21dfc690092298884c3e0e2fd2 Mon Sep 17 00:00:00 2001 From: David Daily Date: Tue, 14 Jan 2020 10:53:05 -0600 Subject: [PATCH] add function to remove extra empty lines from ini when writing --- func.ahk | 1 + 1 file changed, 1 insertion(+) diff --git a/func.ahk b/func.ahk index c0bcb1d..0fb36aa 100644 --- a/func.ahk +++ b/func.ahk @@ -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