ID:177746
 
Is there any way to display text without it returning to a new line at the end?
*bump*
Malver wrote:
Is there any way to display text without it returning to a new line at the end?

The \... text macro is used for this.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Malver wrote:
Is there any way to display text without it returning to a new line at the end?

The \... text macro is used for this.

Lummox JR

I was too vague, my fault.

Is there any way to display the text, but have the next text sent remain on the same line?
In response to Malver
Malver wrote:
Lummox JR wrote:
Malver wrote:
Is there any way to display text without it returning to a new line at the end?

The \... text macro is used for this.

Lummox JR

I was too vague, my fault.

Is there any way to display the text, but have the next text sent remain on the same line?

That's exactly what the \... macro does.

Try this:

mob/verb/textsend(T as txt, T2 as txt)
src << "[T]\.."
src << "[T2]"

Alathon\\
In response to Alathon
Alathon wrote:
mob/verb/textsend(T as txt, T2 as txt)
src << "[T]\.."
src << "[T2]"

Alathon\\

That displays it all together. Using your example, I want to display T, and then display T2 on the same line, but with a pause, let's say.

If T = "Hi "
And T2 = "Alathon"

I want it to display "Hi ", and then, a second later, display "Alathon" on the same line. That's why that escape sequence won't work out. :P
In response to Malver
Malver wrote:
Alathon wrote:
mob/verb/textsend(T as txt, T2 as txt)
src << "[T]\.."
src << "[T2]"

Alathon\\

That displays it all together. Using your example, I want to display T, and then display T2 on the same line, but with a pause, let's say.

If T = "Hi "
And T2 = "Alathon"

I want it to display "Hi ", and then, a second later, display "Alathon" on the same line. That's why that escape sequence won't work out. :P

with a pause? do you mean a space, or a delay? or what. Im a bit confused here.

Alathon\\
In response to Alathon
Alathon wrote:
with a pause? do you mean a space, or a delay? or what. Im a bit confused here.

Alathon\\

A pause, like a sleep statement. Display T, then after, say, 2 seconds, display T2, on the same line.
In response to Malver
mob/verb/Test()
usr << "Blah \.."
sleep(20)
usr << "Meh."
In response to Nadrew
You aren't even listening to me, Nadrew. :P

I said I want to display the first part, pause, and then display the second part, all on the same line.
In response to Malver
Malver wrote:
You aren't even listening to me, Nadrew. :P

I said I want to display the first part, pause, and then display the second part, all on the same line.

The \.. macro forces the next output sent to whomever to be sent to the same line, his snippet does exactly what you want.

Alathon\\
In response to Alathon
Alathon wrote:
The \.. macro forces the next output sent to whomever to be sent to the same line, his snippet does exactly what you want.

Alathon\\

Actually, it doesn't. It waits, then displays both of them at the same time on one line.

I want the first part displayed, then the pause, then the next part displayed on the same line.
In response to Nadrew
Nadrew wrote:
mob/verb/Test()
usr << "Blah \.."
sleep(20)
usr << "Meh."

If I might be the voice of "duh" in this conversation, an ellipsis has at least three dots, not two, and the same applies to the macro. (Technically in writing, you're supposed to use 3 dots for an ellipsis within a sentence, 4 at the end of a sentence, and hit yourself with a brick if you use them all the time.)
This explains why he's not seeing the stuff appear on the same line in some cases, though it doesn't explain the lack of a delay he says he's seeing.

Lummox JR
In response to Malver
Malver wrote:
Actually, it doesn't. It waits, then displays both of them at the same time on one line.

I want the first part displayed, then the pause, then the next part displayed on the same line.

I'm starting to see what you mean here. I think the text isn't output until the whole line is available; otherwise the first part would be displaying during the sleep.

I'm not sure there's a workaround for this.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
This explains why he's not seeing the stuff appear on the same line in some cases, though it doesn't explain the lack of a delay he says he's seeing.

Lummox JR

That wasn't the problem at all. It wouldn't have compiled with his code. :P
In response to Lummox JR
Lummox JR wrote:
I'm starting to see what you mean here. I think the text isn't output until the whole line is available; otherwise the first part would be displaying during the sleep.

I'm not sure there's a workaround for this.

Lummox JR

Ah, yes. A short test revealed exactly this. Perhaps this should be a feature request? I could find a few uses of my own for this.

Alathon\\
In response to Alathon
Ha! After some experiments with backspace escape codes in html, I stumbled upon a solution that works. If you preceed the line with "<html>", it works! Last line is normal to prevent it from adding next line.
mob
Login()
..()
world << "<html>Imagination "
sleep(5)
world << "<html>is "
sleep(5)
world << "<html>greater "
sleep(5)
world << "<html>than "
sleep(5)
world << "knowledge."


/Gazoot
In response to Gazoot
Gazoot wrote:
Ha! After some experiments with backspace escape codes in html, I stumbled upon a solution that works.

Neato! Thanks a bunch.

Alathon\\
In response to Gazoot
Haha! Woo!

Hats off to Gazoot!

Thanks a lot, I appreciate your help. Now that I have a way that does work...I'm kinda of curious as to why this works?
In response to Malver
Malver wrote:
Haha! Woo!

Hats off to Gazoot!

Thanks a lot, I appreciate your help. Now that I have a way that does work...I'm kinda of curious as to why this works?

Html does not recognize normal return characters(such as the \n appended to the end of a string, I believe), but rather uses <*br> (without the asterix, I dont know the character code to show <'s). So it assumes its all one line.

I think, anyway. Im not the expert at HTML, far from it.
Alathon\\
Page: 1 2