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

how to clear the console?

Started by Ducklet, 21 January 2013 - 01:02 PM
Ducklet #1
Posted 21 January 2013 - 02:02 PM
I know you can clear the monitor with Monitor.clear(), is there a way I can do that in the console?
RunasSudo-AWOLindefinitely #2
Posted 21 January 2013 - 02:09 PM
To clear the computer screen:
clear

To clear an external monitor:
monitor left clear
Replace "left" with the side of the monitor.
Edited on 21 January 2013 - 01:10 PM
Lyqyd #3
Posted 21 January 2013 - 02:10 PM
You can either use the clear program, or use term.clear() inside a program. See the term API on the wiki.
Ducklet #4
Posted 21 January 2013 - 02:12 PM
To clear the computer screen:
clear

To clear an external monitor:
monitor left clear
Replace "left" with the side of the monitor.
I mean in code
RunasSudo-AWOLindefinitely #5
Posted 21 January 2013 - 02:13 PM
To clear the computer screen:
clear

To clear an external monitor:
monitor left clear
Replace "left" with the side of the monitor.
I mean in code
You said "in the console".

term.clear()
or

peripheral.call("left", "clear")
For the computer screen or an external monitor, respectively.
Edited on 21 January 2013 - 01:13 PM
Mvf314 #6
Posted 30 January 2013 - 04:17 AM
You can just make a program called "clear", with this code:


term.clear()

then save and type


monitor <side> clear
Replace <side> with the side of the monitor.
Lyqyd #7
Posted 30 January 2013 - 04:24 AM
You can just make a program called "clear", with this code:


term.clear()

then save and type


monitor <side> clear
Replace <side> with the side of the monitor.

The clear program already exists. It also sets the cursor position to the top-left corner.