Posted 29 June 2013 - 07:13 PM
Title: line break on a monitor?
Okay guys,
I'm usually a lurker here, but I'm trying to find if there is a way to inject a line break in my monitor coding.
I'm using a very simple code with a dedicated computer to post rednet messages on a 4x3 monitor next to it…
I'm new to coding in CC and probably have bad code ettiquet, so I apologize for that.
The current program is a startup program so I don't have to do anything other than glance, but the problem is that it currently writes things as:
32>Hello World!36>Hello World!
obviously that is a bit confusing. I know about clearLine() and clear() commands, but that might make me miss something I would like to see. I understand I could define a setCursorPos(x,y) but then multiple messages might be overwritten or lost.
Does anyone have an idea about how I can go about making this work? Or is this just not implemented in the current coding yet?
Okay guys,
I'm usually a lurker here, but I'm trying to find if there is a way to inject a line break in my monitor coding.
I'm using a very simple code with a dedicated computer to post rednet messages on a 4x3 monitor next to it…
local monitor = peripheral.wrap("left")
rednet.open("right")
while true do
event, id, text = os.pullEvent()
if event == "rednet_message" then
monitor.write(id..">"..text)
end
end
I'm new to coding in CC and probably have bad code ettiquet, so I apologize for that.
The current program is a startup program so I don't have to do anything other than glance, but the problem is that it currently writes things as:
32>Hello World!36>Hello World!
obviously that is a bit confusing. I know about clearLine() and clear() commands, but that might make me miss something I would like to see. I understand I could define a setCursorPos(x,y) but then multiple messages might be overwritten or lost.
Does anyone have an idea about how I can go about making this work? Or is this just not implemented in the current coding yet?