Text to one line macro

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Mar 4th, ’19, 19:58

Hello,

Does anyone know how one would go about pasting (clipboard) text into one line as in:
https://lingojam.com/TexttoOneLine

I've tried following example of this thread:
https://autohotkey.com/board/topic/9338 ... pied-text/

but to no avail
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Mar 4th, ’19, 21:19

Try this:

Code: Select all

String:=clipboard
StringReplace, string, string, `n, , A
StringReplace, string, string, `r, , A
Send, % string
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Mar 4th, ’19, 21:30

Marko wrote: Mar 4th, ’19, 21:19 Try this:

Code: Select all

String:=clipboard
StringReplace, string, string, `n, , A
StringReplace, string, string, `r, , A
Send, % string
That did it. Many thanks.
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Mar 4th, ’19, 22:09

Marko wrote: Mar 4th, ’19, 21:19 Try this:

Code: Select all

String:=clipboard
StringReplace, string, string, `n, , A
StringReplace, string, string, `r, , A
Send, % string
By the way, note sure if I ought to make a thread on it's own for this, but you wouldn't perhaps also know of a macro that pastes back copied text, all in small letters?
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Mar 5th, ’19, 17:33

Similar to above..

Code: Select all

String:=Clipboard
StringLower, string, string
Send, % string
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Mar 5th, ’19, 17:39

Marko wrote: Mar 5th, ’19, 17:33 Similar to above..

Code: Select all

String:=Clipboard
StringLower, string, string
Send, % string
Much obliged! Would upvote if I could
Post Reply