i want a text on a monitor but how do i do it can sombody help my?
monitor text
Started by sjoerd2k, Jan 02 2014 02:20 PM
2 replies to this topic
#1
Posted 02 January 2014 - 02:20 PM
#2
Posted 02 January 2014 - 04:12 PM
First, Wrap it
Note that all the 'term' functions does work for monitors, So you can do this
mon.clear()
mon.setCursorPos(1,1)
mon.setTextColor(colors.white)
mon.setBackgroundColor(colors.black)
etc..
local mon --# Create a variable for the monitor for _, name in ipairs( peripheral.getNames() ) do -- Loop through all peripherals attached if peripheral.getType( name ) == "monitor" then -- Check if the peripheral type was a monitor mon = peripheral.wrap( name ) -- If it was the wrap it break -- And break from the loop end endNow it's simple, You can do this
mon.write("Hello World!")
Note that all the 'term' functions does work for monitors, So you can do this
mon.clear()
mon.setCursorPos(1,1)
mon.setTextColor(colors.white)
mon.setBackgroundColor(colors.black)
etc..
Edited by Hellkid98, 02 January 2014 - 04:16 PM.
#3
Posted 02 January 2014 - 04:59 PM
You can also use term.redirect, which will allow you to then use print() and write() and textutils.tabulate(), etc.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











