为什么 JREPL.bat 关闭我的批处理脚本?

Why does JREPL.bat close my batch script?

我在使用 JREPL.bat.

时遇到了一些问题

每当我在批处理脚本中使用 JREPL 时,它都会在 运行 命令后完全关闭我的批处理会话。它仍然像它应该的那样替换文本。但它仍然关闭。这是代码:

@echo off
cls
@mode 50, 35

:start
cls
echo.
echo.
echo Enter Account Pin:
set /p pin=": "

:: Finding the specified pin
findstr /m "%pin%" %cd%\pins\bin.txt >Nul
if %errorlevel%==0 (
echo Pin "%pin%" is valid
timeout 1 >nul
goto account
)

if %errorlevel%==1 (
echo Pin "%pin%" is invalid
pause
goto start
)

:account
cls

:: Finds the name of the account owner and continues
setlocal
for /F "tokens=2 delims=/" %%a in ('findstr /I "%pin%/" %cd%\pins\bin.txt') 
do set "user=%%a"  
for /F "tokens=3 delims=/" %%b in ('findstr /I "%pin%/%user%/" 
%cd%\pins\bin.txt') do set "balance=%%b"  
echo.
echo.
echo Welcome, %user%.
echo.
echo ACCOUNT BALANCE: $%balance%
echo.
echo 1=Deposit / 2=Withdraw / 3=Exit / 4=Refresh
choice /c 1234 >nul 
if %ERRORLEVEL% EQU 1 goto deposit
if %ERRORLEVEL% EQU 2 echo withdraw & pause
if %ERRORLEVEL% EQU 3 exit
if %ERRORLEVEL% EQU 4 goto account

:deposit
echo.
echo.
set /p add="Money to Add: "
set /a moneytoadd=%balance%+%add%
jrepl "%pin%/%user%/%balance%" "%pin%/%user%/%moneytoadd%" /f 
%cd%\pins\bin.txt /o -
call dial.bat
endlocal

我想要最简单的解决方案,谢谢。

因为jrepl.bat是一个批处理文件。

要在一个批次中执行一个批次,您需要

CALL target.bat ...

它为批处理提供 return 位置,用于 CALLed 批处理完成的时间。