/World.Note World.GetLineInfo (World.GetLinesInBufferCount, 1)
Should that not repeat the latest line in the output window (with the styling stripped)?
It doesn't seem to work properly for me. More often than not, I just get a blank line outputted instead of what was the latest line.
Same problem if I use World.GetStyleInfo.
From the online help for GetLineInfo:
Quote:
The line number can be from 1 (the first line) to the number of lines in the output window. You can use "World.GetLinesInBufferCount" to find how many lines are currently in the output window. This number is different from the sequential number of the line since the world opened. For example, if your buffer size is 5000 lines, and you have received 8000 lines, then the last line will be line 3000 in the buffer but "actual line number" (selector 10 below) will return 8000.
Huh?
If your buffer size is 5000 lines, and you have received 8000 lines, then should not the last line be 5000?
Clearly I am dumb on this one, since my buffer size IS 5000, and if I CTRL-HOME I see that stuff has scrolled off beyond the buffer size, yet if I "/World.Note World.GetLinesInBufferCount" the answer is < 5000.
Anyway...
/World.Note World.GetStyleInfo(World.GetLinesInBufferCount-1,1,1)
Seems to work somewhat, although it seems a bit erratic... but maybe that's the rest of the code I am working with (It's someone else's, that I am attempting to edit).
Ahh... I think I just discovered part of the problem. The prompt, of course.
If the prompt is displayed, then GLIBC is indeed the latest line, with the prompt. If there is no prompt, then GLIBC is blank, and GLIBC-1 is actually the latest line.
In Other words, GLIBC is the line number where the next string output will be displayed. Often, this is the next blank line that hasn't actually been displayed yet.
This isn't reliable to function on, though, since the placement of new strings (on a prompt line or not) are far too chaotic to attempt to track them.
GRRRR!
I could configure the mud to newline when it shows a prompt, but then my input commands often end up at the end of incoming lines, which looks rather unappealing visually. Also, more blank lines, and I have enough of those already.
Well, so far it looks like my exploration into colourstyles is a dismal failure. I may have to look to ShadowFyr to write my stuff for me.
Shadowfyr: This all came about because of the "HitBar" plugin. I noticed it prints the "HP: [" in grey rather than blue, which is my configured health bar colour. In other words, I saw that it was grabbing the wrong colour style, and wanted to figure out why).
Man, I'm cranky cause there is no food in the house and I am starving. My apologies. :( |