This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
chris31735's profile picture

writing on a monitor

Started by chris31735, 04 November 2012 - 10:37 AM
chris31735 #1
Posted 04 November 2012 - 11:37 AM
Hello I'm going to show you a simple way to write on monitors using normal computers i will show you what the code does so you learn and I will provide a link to my AdminMon program that works on advanced Computers.

1) writing on the monitor first what you do is let the computer know it's next to a monitor
monitor = peripheral.wrap("right")
you can change the "right" to whatever direction you want it just connects the monitor

2) The monitor is wrapped but you need to tell it what it need to do so you type this

term.clear()
monitor.clear()
start()
term.setCursorPos(1, 2)
print("What do you want to type in the Monitor:")
input = read()
monitor.setCursorPos(1, 1)
monitor.write(input)
term.clear()

let me explain the important parts

monitor.write(input)
it’s saying whatever input reads it puts it on the monitor

This is how you input something into a monitor
Leo Verto #2
Posted 05 November 2012 - 01:17 AM
You can just term.redirect() to the monitor, I however do not know the exact way of doing that.
chris31735 #3
Posted 05 November 2012 - 06:19 AM
You can just term.redirect() to the monitor, I however do not know the exact way of doing that.
yeah but i like using monitor = peripheral.wrap("direction") because then you can use multiple monitors at the same time for example
monitor1 = peripheral.wrap("direction")
monitor2 = peripheral.wrap("direction")
then to control in which can be typed on the you do
monitor1.write("Hello World')
kazagistar #4
Posted 05 November 2012 - 07:50 AM
Good tutorial. I would recommend using code tags even for small code sections.
chris31735 #5
Posted 05 November 2012 - 10:16 AM
Good tutorial. I would recommend using code tags even for small code sections.
Thanks! I will do that next time.
kazagistar #6
Posted 05 November 2012 - 10:35 AM
You could just edit it in this time :D/>/>