Im trying to run a basic batch countdown with user input to skip it (like a loading page that runs an animation and users can skip it if they want)
and I did my research over here.. I was using ping commands but that didn't gave me any option to get user selection.. than I moved to choice and found this helping article
How to ask for batch file user input with a timeout
the problem Im having is that the answer provided simply flashes the choice's text over the screen for a brief time.. any way to overcome this?
Edit: Here is the code that I use.. a b and c are examples but the pc will restart text flashes
@echo off
setlocal enableDelayedExpansion
for /l %%N in (1800 -1 1) do (
set /a "min=%%N/60, sec=%%N%%60, n-=1"
if !sec! lss 10 set sec=0!sec!
choice /c:CN1 /n /m "PC will restart in !min!:!sec! - Press N to restart Now, or C to Cancel. " /t:0 /d:1
cls
echo a
echo b
echo c
choice /c:CN1 /n /m "PC will restart in !min!:!sec! - Press N to restart Now, or C to Cancel. " /t:1 /d:1
if not errorlevel 3 goto :break
)
cls
echo PC will restart in 0:00 - Press N to restart Now, or C to Cancel.
:break
if errorlevel 2 (echo restarted) else echo Restart Canceled
pause>nul