Removing new line?

Posted by Shady Stranger on Sun 25 May 2014 05:08 PM — 4 posts, 16,348 views.

USA #0
I am trying to create an alias that will send several paragraphs of information on one line and keep the formatting. For example, if I were to copy/paste the following poem into the command line, it would automatically send each line of the poem as a new line. How do I remove the new line function, using an alias to do it?

Quote:

TWO roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,

And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.


Basically, what I want to do is the following but without having to take the time to put it all on one line with \n.

Quote:

TWO roads diverged in a yellow wood,\nAnd sorry I could not travel both\nAnd be one traveler, long I stood\nAnd looked down one as far as I could\nTo where it bent in the undergrowth;\n\nThen took the other, as just as fair,\nAnd having perhaps the better claim,\nBecause it was grassy and wanted wear;\nThough as for that the passing there\nHad worn them really about the same,\n\nAnd both that morning equally lay\nIn leaves no step had trodden black.\nOh, I kept the first for another day!\nYet knowing how way leads on to way,\nI doubted if I should ever come back.\n\nI shall be telling this with a sigh\nSomewhere ages and ages hence:\nTwo roads diverged in a wood, and\nI took the one less traveled by,\nAnd that has made all the difference.
Australia Forum Administrator #1
Aliases are terminated by a newline, so this won't be easy to turn into an alias.

However what you could do is press Ctrl+I to open the Immediate scripting window, and then copy and paste your poem with a couple of extra lines, like this:


Send [[
TWO roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,

And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference. 
]]


The square brackets make up a Lua multi-line string constant. That way the multiple lines (including the newlines) will be sent in one hit.
USA #2
I just tried that and it didn't work. Here's the output from the game, hopefully it will demonstrate what I am trying to accomplish.

Quote:

scribe

A frazzled scribe sighs while examining the tip of a feather quill.

A frazzled scribe asks, "Would ye like me to scribe a letter, application, note, document, charter, recipe, invitation, missive, or parchment (L/A/N/D/C/R/I/M/P)?"
p


A frazzled scribe asks you, "To whom shall I address a small parchment?"
Recipient's name:
myself

A frazzled scribe asks you, "What will this message will entail, as I will make a brief note of it."
In regards to:
test

A frazzled scribe asks you, "What would ye like to have as your message to myself?"
Message:
This is a test

This is a test

This is a test

This is a test --my input

A frazzled scribe asks you, "Who shall I address the message from?"
Signature:

A frazzled scribe finishes up the last of her writing and shows it to you.

It looks like a small parchment addressed to myself in regards to test.

___________________________________________________________


myself,

This is a test




___________________________________________________________


A frazzled scribe asks you, "Is this acceptable?" (Y/N/Redo)A frazzled scribe asks you, "Is this acceptable?" (Y/N/Redo)A frazzled scribe rips up a small parchment.
Huh?
HP: 185/185 ST: 113/113 Carry: 350/468 M: 0

Huh?
HP: 185/185 ST: 113/113 Carry: 350/468 M: 0


In order for this to work properly, I would have to send the message like this:

Quote:

This is a test\n\n This is a test\n\n This is a test\n\n This is a test


The reason for this is for making readable maps and artwork within the game. In order to make something like this, it would need to be made how it is supposed to look in notepad then go through and replace all the new lines (where the return/enter key was used) with \n so it can all be sent as one command. I was hoping to make an alias or other type of script to simplify this process.
Australia Forum Administrator #3
Have a look at the Edit menu -> Paste to world.

Have your message ready in Notepad (and copied to the clipboard), and then when you reach the line:

Quote:

A frazzled scribe asks you, "What would ye like to have as your message to myself?"


Hit "paste to world" (Shift+Ctrl+V). Then the prepared message is pasted, with a newline after each line. I don't see why that wouldn't work.