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

Simultaneous Terminal & Monitor

Started by Okyloky9, 27 November 2013 - 07:34 PM
Okyloky9 #1
Posted 27 November 2013 - 08:34 PM
It was a while ago but I saw a program that you saw things on a monitor while they were happening, but you controlled and SAW everything on the terminal at the same time.

I was just wondering if there was still something like that, because I could use something like that for a program I'm working on.
Lyqyd #2
Posted 27 November 2013 - 08:35 PM
Yeah there are mirroring/cloning APIs all over the place on the forums. Look through the Programs section and the APIs and Utilities subsection.
Wojbie #3
Posted 28 November 2013 - 09:59 AM
For example this program http://www.computercraft.info/forums2/index.php?/topic/15873-mirror-utility.
TheOddByte #4
Posted 29 November 2013 - 11:25 AM
Well if you want to know how to create such a program you would have to override like all the term functions basically, Something like this

oldWrite = term.write         -- Creating a backup for term.write
term.write = function(text)  -- Overriding the function
    oldWrite(text)                 -- Using the original term.write function to write to the screen
    mon.write(text)               -- This is if you have wrapped a monitor as 'mon' and it will write the text on the screen on the monitor aswell
end