Handling a solitary linefeed (`n) in the Edit control
Posted: 19 Apr 2019, 08:33
Hello,
When I paste text containing a solitary linefeed (`n), `r`n pairs is not produced inside the Edit control.
In other words, it won't appear as multiple lines.
How to do If I treat the text after (`n) as the same row or can make it appear as multiple lines?
Such as
I want to treat "a b" as one row and "cd" as another row.
I save it to a variable x with "Gui Submit" and split it using "Loop, Parse, x, `n".
But at this time the value of x will be
x[1] = a
x[2] = b
x[3] = cd
I expect to be
x[1] = a b
x[2] = cd
Any good suggestions?
When I paste text containing a solitary linefeed (`n), `r`n pairs is not produced inside the Edit control.
In other words, it won't appear as multiple lines.
How to do If I treat the text after (`n) as the same row or can make it appear as multiple lines?
Such as
Code: Select all
a `nb`r`n ; The first row after pasting
cd
I save it to a variable x with "Gui Submit" and split it using "Loop, Parse, x, `n".
But at this time the value of x will be
Code: Select all
a `nb`n
cd
x[2] = b
x[3] = cd
I expect to be
x[1] = a b
x[2] = cd
Any good suggestions?