Advertisement
koki2000

redirect mon to term CC 1.6 and later

Oct 9th, 2015
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. local mon = peripheral.wrap("top")
  2.  
  3. -- If using a build of ComputerCraft with term.current, record the current terminal output object:
  4. if mon then restoreto = term.current() end
  5.  
  6. -- Redirect the terminal to the attached monitor:
  7. term.redirect(mon)
  8. print("helo")
  9.  
  10. -- Restore back:
  11. if restoreto then
  12.     term.redirect(restoreto)
  13. else
  14.     term.restore()
  15. end
  16. print("vilag")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement