I was using a similar script to remove line breaks when copy/pasting but your script is working much better mine does, so, thank you!
I did make a small tweak because I was getting some cases where there was a missing space between words but this can be solved by substituting the "" with A_Space, which automatically trims out extra spacing (if I'm reading the documentation correctly).
https://www.autohotkey.com/docs/v1/lib/AutoTrim.htm
Code: Select all
#NoEnv
; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
^c:: Suspend, On ; Suspend this scripts so the following ^c becomes a normal copy
Clipboard =
Send, ^c
Sleep, 50 ; Wait for clipboard
Clipboard := RegExReplace(Clipboard, "\r\n|\r|\n", A_Space)
Suspend, Off
return
In any case, this saved me a lot of time and I really appreciate it!