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

[Computercraft 1.31 for minecraft 1.2.3][Question] How to Use monitors in lua shell

Started by miyoyo, 14 March 2012 - 09:01 AM
miyoyo #1
Posted 14 March 2012 - 10:01 AM



Hello, I'm creating a movie but I have a problem
I use Rednet to start the movie but I do not know how to start an application on a monitor using shell.run, thank you in advance for your help

Miyoyo




6677 #2
Posted 14 March 2012 - 11:50 AM

local side = "left"  -- change this
if peripheral.getType(side) ~= "monitor" then
    print("No monitor on that side")
    return -- Neatly exits the program
else
    local monitor = peripheral.wrap(side)
    term.redirect(monitor)
end

All future output will redirect to the monitor on whichever side you specify.

To return the output to the computer again use

term.restore()
miyoyo #3
Posted 14 March 2012 - 02:24 PM
Thanks!