I'm trying to make what seems like a simple trigger that replaces a line with another in the output, with some fancy colours and whatnot.
For example something like:
You have some things.
replaced with
"
You have "..things.."
things."
Now, I'm doing this simply by something like this:
Code: Select all
fg("blue")
echo("You have "..things)
fg("green")
echo("th")
and so on. That's all well and good, but I can't seem to delete the original line AND show the echoes at the same time. If I do selectString(line,1) and replace("") before the rest, the echoes are shown, but without any of the colours. If I do deleteLine(), nothing is shown, but if I scroll up and down, the echoes are shown with all the colours, but on the previous line (in this case the command echo)
On another related note, echo("\n") seems to show a bell instead of a newline when used after deleteLine(), but a newline in a random place if used after replace("")