This works well in Linux/Windows/Mac terminals. However, when I launch this command tool inside a TAsyncProcess, and capture the outputs and print them in a Tmemo, I found the command line program got confused on the width of the "console window". In the first pass of the above "mcx_progressbar()" call, it assumes a console width of 5230 (not sure why), and then it drops to 0 in all calls afterwards. This gives me extremely long buffer for printing the progress bar.