Page 2 of 2

Re: Remove line breaks

Posted: Aug 30th, ’24, 09:31
by Tom
?

Code: Select all

Clipboard:=""
Send, ^c
ClipWait
string:=clipboard

stringreplace, string, string, `r`n`r`n, ♥, all
stringreplace, string, string, `r`n, %A_Space%, all
stringreplace, string, string, ♥, `n`n, all

Loop 
{ 
    StringReplace, string, string, %A_Space%%A_Space%, %A_Space%, UseErrorLevel 
    if ErrorLevel = 0  ;no more replacements needed
        break 
}

SendInput, % string