Logic Engine
Posted: 20 Apr 2017 15:25
I am working on a logic engine where you can run normal commands and also call a logic function. first I made an engine it could do the logic just fine, but it couldn't run other commands.
Then I tried to put that in an interactive console as a function and it didn't work anymore
can somebody help with this?
Thanks, BatNoob
Code: Select all
@echo off
:begin
cls
title Logic engine v1.0
set /p "var=Type logic command>>"
call:LogEn
echo %var%
choice /m "Again?"
IF %ERRORLEVEL% == 1 (GOTO :begin) ELSE (IF %ERRORLEVEL% == 2 (EXIT /B))
:LogEn
if %var% (set "var=True"
) else (set "var=False")
GOTO:EOF
Then I tried to put that in an interactive console as a function and it didn't work anymore
Code: Select all
@echo off
title LIC_v1.0
:1
set /p "command=Type a command>>"
for %%g in (1) do (%command%)
goto :1
exit /b
:Engine arg
@echo off
setlocal
cls
set "var=%1"
call:LogEn
echo %var%
:LogEn
if %var% (set "var=True"
) else (set "var=False")
GOTO:EOF
endlocal
GOTO:EOF
can somebody help with this?
Thanks, BatNoob