Hello,
i've been printing some values to console, like fps for instance, but it writes it in a new line every second (used print()). Is there any way to clear the console to make it print value on the same position in console, clearing the screen in between? I tried to use os.execute('cls'), but it gives me weird results (attached).
Thanks!
Console clear screen
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Console clear screen
Maybe with the classic ESC [ H ESC [ 2 J? Not sure if that works in a Windows terminal.
Code: Select all
for i = 1, 50 do
print("\027[H\027[2JThis tests printing a control sequence that clears the screen")
end
Who is online
Users browsing this forum: casual_dodo and 4 guests