Remove line breaks

Share your favorite FastKeys commands
User avatar
Tom
Posts: 836
Joined: Nov 24th, ’15, 23:39

Post by Tom » Aug 30th, ’24, 09:31

?

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
Post Reply