I'm making my first Lua program with the console, and I need to find out how to remove all the text in the console without just appending a ton of \n's.
Console clear() The clear() method clears the console. The clear() method also write "Console was cleared" in the console.
To use the Lua Console: select the environment you want from the dropdown below the status indicators. enter some code in the first text field. Press Ctrl+Enter or click the “Execute” button to send the code snippet to DCS: World and wait for the result to be displayed at the bottom.
Clear Terminal via Ctrl+L / Ctrl+Shift+K Shortcut Keyboard shortcuts also work for clearing the terminal, depending on the terminal emulator. An alternative in some terminal emulators is Ctrl + Shift + K . The command provides the same output as Ctrl + L .
You can use os.execute()
.
On Windows:
os.execute("cls")
On Unix:
os.execute("clear")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With