![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-19 13:16 |
共 47,814 主题排行 / 349,908 发帖 / 今日 0 篇 / 48,259 会员排行 |
| DOS疑难解答 & 问题讨论 (解答室) » WBAT程序切换 |
| 可打印版本 874 / 3 |
| 第1楼 liushegnjie888 | 发表于 2008-09-11 15:13 |
| 新手上路 发帖 3 积分 12 | |
|
WBAT程序切换 比如说我想在AA下的1.exe运行一段时间后运行另外一个程序如BB下的2.exe我该怎么写!
@echo off cls @echo off :top call w.bat box @dos.bat:menu if "%?%"=="1" goto AA if "%?%"=="2" goto BB if "%?%"=="3" goto CC if "%?%"=="4" goto DD if "%?%"=="5" goto EE if "%?%"=="6" goto FF if "%?%"=="7" goto exit goto exit :menu ======= Select an item to run ======= [1.AA ] [2.BB ] [3.CC ] [4.DD ] [5.EE ] [6.FF ] [7.EXIT ] Use dos.bat to show this menu in dos :: :AA 1.EXE goto exit :BB 2.exe goto exit :CC 3.exe goto exit :DD 4.bat goto exit :EE 5.exe goto exit :FF 6.exe goto exit :exit |
|
| 第2楼 lianjiang2004 | 发表于 2008-09-11 16:13 |
| 金牌会员 发帖 1,884 积分 3,946 | |
|
什么叫运行一段时间后?
|
|
| 第3楼 xiaoyunwang | 发表于 2008-09-11 16:28 |
| 高级用户 发帖 374 积分 940 来自 湖南张家界 | |
|
@echo off
cls :: 设置依次菜单调用之间的延时,假设为10秒 set timeout=10 :: 设置用 mpos 环境变量保存程序调用上一个菜单处的位置 set mpos= @echo off :top call w.bat box @dos.bat:menu #%mpos%+1,%timeout% if "%?%"=="1" goto AA if "%?%"=="2" goto BB if "%?%"=="3" goto CC if "%?%"=="4" goto DD if "%?%"=="5" goto EE if "%?%"=="6" goto FF if "%?%"=="7" goto exit goto exit :menu ======= Select an item to run ======= [1.AA ] [2.BB ] [3.CC ] [4.DD ] [5.EE ] [6.FF ] [7.EXIT ] Use dos.bat to show this menu in dos :: :AA 1.EXE goto top :BB 2.exe goto top :CC 3.exe goto top :DD 4.bat goto top :EE 5.exe goto top :FF 6.exe goto top :exit :: 清空环境变量 set ?= for %%a in (wbat timeout mpos) do set %%a= |
|
| 第4楼 xyh6801 | 发表于 2008-09-25 15:57 |
| 新手上路 发帖 6 积分 12 | |
|
多任务?
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |