console.width readonly

The console.width property gets the current console width in character. That value depends on the current console window size.

Example

--! luart-extensions import console local colors = { "black", "blue", "green", "cyan", "red", "purple", "yellow", "white", "gray", "lightblue", "lightgreen", "lightcyan", "lightred", "lightpurple", "lightyellow", "brightwhite" } console.clear() for color in each(colors) do console.bgcolor = color console.write(string.rep(" ", console.width)) console.write(string.rep(" ", console.width)) end console.readchar()