Skip to content

Instantly share code, notes, and snippets.

@zai1208
Last active August 22, 2020 02:16
Show Gist options
  • Save zai1208/6ea4e1cf4e45fa265748ab020c2977f0 to your computer and use it in GitHub Desktop.
Save zai1208/6ea4e1cf4e45fa265748ab020c2977f0 to your computer and use it in GitHub Desktop.
@echo off
:detect
choice /cs /n /c HKPMq
if %errorlevel%==1 call :UP
if %errorlevel%==2 call :RIGHT
if %errorlevel%==3 call :DOWN
if %errorlevel%==4 call :LEFT
if %errorlevel%==5 goto :quit
:UP
echo UP
goto:eof
:RIGHT
echo RIGHT
goto:eof
:DOWN
echo DOWN
goto:eof
:LEFT
echo LEFT
got:eof
:quit
pause
got:eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment