term.redirect

Redirects to a terminal, and returns all Term objects available in the specified terminal.

ExampleMake a window and write some text in it
Makes a window, redirects to it, writes some text, and then goes back to the native window.
Code
<nowiki>
local win = window.create(2, 2, 10, 10, term.native())
term.redirect(win)
print("Hello world!")
term.redirect(term.native())
print("This is in the main area.")
</nowiki>
Output Shows a window with some text in it and some text in the main term.

term.redirect
Function
Syntax
term.redirect(
  • term : table
)

Returns table terminal
API term
Source CC:Tweaked
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.