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

Show everything I do on my computer on a monitor?

Started by Klausar, 18 February 2013 - 02:00 AM
Klausar #1
Posted 18 February 2013 - 03:00 AM
I wondered if it is possible to show everything I do (like writing a program) on a monitor next to the computer, can someone tell me how to do it?
Exerro #2
Posted 18 February 2013 - 03:08 AM

side = enter side here
oldTerm = _G["term"]["write"] -- sets oldTerm.write to term.write
function term.write( arg ) -- overwrites term.write
	  local x, y = term.getCursorPos() -- gets the cursor pos
	  oldTerm.write( arg ) -- writes the arg
	  mon = peripheral.wrap( side ) -- changes display to monitor
	  mon.setCursorPos( x, y ) -- sets the cursor pos to the same as the screen
	  mon.write( arg ) --writes the stuff
end
--code here
term.write = oldTerm.write -- put this at the end of your code or anywhere that you will stop running the code
this should work i think but it wont do colours…is that a problem?
GravityScore #3
Posted 18 February 2013 - 04:21 AM
BigSHinyToys already made a program for this. It called splitter. Can't link you sorry, on my phone at the moment. Just try searching for it.
PixelToast #4
Posted 18 February 2013 - 05:02 AM
http://www.computercraft.info/forums2/index.php?/topic/5987-splitter-run-term-and-monitor-at-the-same-time/