How to update terminal output?
dog2002
742617000027 at aaathats3as.com
Sun Mar 28 17:52:11 UTC 2021
On Sunday, 28 March 2021 at 17:13:02 UTC, Mark Lagodych wrote:
> On Sunday, 28 March 2021 at 16:45:29 UTC, dog2002 wrote:
>> I mean, I want to write a string without a new line. For
>> example, some command line applications have progress bars.
>>
>> For a single line string I use \r. But it doesn't work for a
>> multiple line string - the application is just adding new
>> lines.
>
> See http://www.climagic.org/mirrors/VT100_Escape_Codes.html
> Basically, you just need to do this:
>
> writeln("\033[" ~ cmd);
>
> where cmd is your VT100 command and \033 is an Escape character.
>
> Although some (all?) of that commands do not work in the
> Windows terminal. For instance, you can change background color
> ONLY using Windows API.
Thank you. Seems like \033[<n>A\r does work.
More information about the Digitalmars-d-learn
mailing list