Fuzzy Posted November 18, 2012 Posted November 18, 2012 I need a really simple code , as simple as it can get on showing text onto a monitor. biden89 1
Linear_Spoon Posted November 18, 2012 Posted November 18, 2012 mon = peripheral.wrap("right") --assumes monitor is on right side of computer mon.clear() --clear the monitor mon.setCursorPos(1,1) --set cursor to upper left position mon.write("Hello world!") --write text
Fuzzy Posted November 18, 2012 Author Posted November 18, 2012 What if i want to create a new line and such?
Linear_Spoon Posted November 18, 2012 Posted November 18, 2012 Check out this link for a list of commands http://computercraft.info/wiki/index.php?title=Peripheral_(API)#Monitor To write a new line you can use mon.setCursorPos(line number,1) -- replace line number with a variable or literal number mon.write("Some text") I thought you could use print() with monitors but perhaps not, none of my programs seem to use it. Print() automatically moves to a new line after each statement.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now