41 posts
Posted 05 April 2013 - 02:47 PM
Ok so I don't even know how to start this kind of programing but I want to have the height and width of the monitor so I can center things
1688 posts
Location
'MURICA
Posted 05 April 2013 - 02:51 PM
Wrap it, then use the getSize method.
local monitor = peripheral.wrap('whatever side your monitor is on')
local width, height = monitor.getSize()
monitor.write(width..'x'..height)
41 posts
Posted 06 April 2013 - 11:39 AM
Oh ok. Great! Do you know how to make a message able to enter the line after it goes far enough
27 posts
Posted 06 April 2013 - 06:51 PM
You can use monitor.setCursorPos(x,y) in conjunction with monitor.write("msg").
379 posts
Location
Hawaii
Posted 06 April 2013 - 07:05 PM
If in case you're talking about the screen that shows up when you left click a computer, use term.getSize(), term.setCursorPos(), and so on.
41 posts
Posted 07 April 2013 - 12:53 PM
What I mean is when you display something on a monitor if the message is too long then it goes off the screen
1522 posts
Location
The Netherlands
Posted 07 April 2013 - 01:55 PM
You must use term.redirect for this.:
local m = peripheral.wrap("side")
term.redirect(m)
print("Hello world!")
term.restore()