我正在用一些花哨的东西做一个批量游戏。我知道你可以让它弹出消息之类的,但我感兴趣的是一个不同的弹出窗口:我想做一个加载程序。
例如,在完成一项任务后,这个加载程序将弹出。装载机完成后,批处理将继续。我试着做一个类似于其中之一的装载机:

这与(MSG)命令所使用的弹出样式相同。我想指定这个加载栏的标题。这有可能是批处理吗?有什么办法可以让.VBS做到这一点吗?
这就是我如何在批处理中生成其他弹出窗口的方式:
echo X=MsgBox("Message Description",0+16,"Title") >msg.vbs发布于 2016-01-06 07:18:11
你可以试试这样的东西:
在一个名为loadbar.bat的文件中,复制以下内容:
@echo off
setlocal EnableDelayedExpansion
set max=16
SET "var="&for /f "delims=0123456789" %%i in ("%2") do set "var=%%i"
if not defined var if not "%~2"=="" set "max=%~2"
title Loading...
if not "%~3"=="" title "%~3"
color 0a
set "top=É"
set "spaces="
set "bottom=È"
for /L %%i in (1,1,%max%) do (
set "top=!top!Í"
set "spaces=!spaces! "
set "bottom=!bottom!Í"
)
set "top=!top!»"
set "bottom=!bottom!¼"
set /A loadnum=0, loadNum1=max-1
set "load="
:Loading
set "load=%load%²"
(
cls
echo Loading "%~1"
echo %top%
echo º%load%!spaces:~0,%loadnum1%!º
echo %bottom%
)
ping localhost -n 2 >nul
set /A loadnum+=1, loadnum1-=1
if %loadnum% lss %max% goto Loading
cls
timeout 1 >nul
title
color
exit在你的游戏中,你可以像这样展示装载栏:
@echo off
start /wait loadbar "executing breach..." 5 "executing breach"
pause加载栏的第一个参数是进度栏上的文本,第二个参数是最大值,第三个参数是标题。
https://stackoverflow.com/questions/34626643
复制相似问题