interactive console app
Posted: Sat Dec 09, 2023 6:46 am
I'm currently creating a console app in LiveCode, but I'm not sure how to make it interact with the command line.
I want to make it like this
this is what i did but i didn't succeed
I use Windows 10
I want to make it like this
Code: Select all
@echo off
echo Hello, please introduce yourself.
set /p name=Your name:
echo Are you human?
set /p human=y/n:
echo What is your favorite programming language?
set /p lang=Your answer:
echo.
echo Answers:
echo 1. %name%
echo 2. %human%
echo 3. %lang%
pause
Code: Select all
on preOpenStack
if the environment is "command line" then
write return to stdout
write "What is your favorite programming language?" to stdout
write return to stdout
read from stdin until EOF
write it to stdout
else
break
end if
end preOpenStack
./mylivecodeapp -ui