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?
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?