this is something seen first time in black bird script, after little investigating, it's 2 chars combined together ALT 0 1 3 + ALT 0 3 2 (0D) Carriage Return + (20) Space here some working example, with color option and this, it's a good option to visual your script. (it work in console new too) Code: @cls @echo off cd /d "%~dp0" setlocal EnableExtensions EnableDelayedExpansion :: Run as Admin with native shell, any path, params, loop guard, minimal i/o, by AveYo >nul reg add hkcu\software\classes\.Admin\shell\runas\command /f /ve /d "cmd /x /d /r set \"f0=%%2\" &call \"%%2\" %%3" & set "_= %*" >nul fltmc || if "%f0%" neq "%~f0" ( cd.>"%tmp%\runas.Admin" & start "%~n0" /high "%tmp%\runas.Admin" "%~f0" "%_:"=""%" &exit /b ) :: make sure before script is running as Admin :: explorer.exe exist in all version, so we can use it for our benefit for /f %%a in ('copy %SystemRoot%\explorer.exe nul /z') do set "RET=%%a" rem Based on BlackBird Idea rem don't know yet what is this !break! char ? rem also it work only in !! and not %% rem interesting behavior echo: echo Working ............ echo Working ............ echo Working ............ echo Working ............ echo: for /l %%i in (0,40,1000) do ( call :drawProgressBar 000 Process %%i%%%% >nul 2>&1 ping 100.0.0.0 -w 1 -n 2 ) echo: echo: echo Done^^! echo: pause exit /b :drawProgressBar <nul set /p "=%*!RET!" endlocal goto :eof
and a bonus, we can use space in Choice Command. we need thus char's (we can use Notepad++ to generate them easily) put them like this "!RET! _SPACE_ _SPACE_ _SPACE_ What do you like to do today ?" Code: :: ALT 0 0 8 set "BS=" :: ALT 0 0 0 7 set "BEL=" (set RET=^ %=Do not remove this line=% )
*offtopic* I discovered Alt+987 as a kid by accident █...I was like, woah...then I started doing ascii/ansi art. ^^
If you want to write in the same line over & over, you can use powershell : Code: @echo off for /l %%n in (1,1,20) do ( powershell "write-host '.' -nonewline" timeout 1 >nul ) echo; pause for overwriting, insert a carriage return and you can play with colors : Code: @echo off for /l %%n in (1,1,20) do ( powershell "write-host \"`r*** test ***\" -nonewline -foregroundcolor red" timeout 1 >nul powershell "write-host \"`r*** test ***\" -nonewline -foregroundcolor blue" timeout 1 >nul ) echo; pause