无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 5144|回复: 4
打印 上一主题 下一主题

帮我看看,错在哪里?

[复制链接]
跳转到指定楼层
1#
发表于 2005-11-14 15:24:59 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
@echo off
echo           
echo           GHOST选择菜单
echo           1、 ghost8
echo           2、 netghost
echo           3、 go to dos
echo           4、 reboot
choice /c:1234  
if errorlevel 1 goto ghost8
if errorlevel 2 goto netghost
if errotlevel 3 goto go to dos
if errotlevel 4 goto reboot
:ghost8
ghost.exe
goto end
:netghost
nghost.bat
goto end
:go to dos
goto end
:reboot
rb.com
goto end
这个错在哪里哦
5#
发表于 2006-7-6 18:53:31 | 只看该作者
以后要主注意啊
回复

使用道具 举报

4#
发表于 2005-11-22 17:01:28 | 只看该作者

帮我看看,错在哪里?

yyyyyyyyyyyyy
回复

使用道具 举报

3#
发表于 2005-11-22 17:01:21 | 只看该作者

帮我看看,错在哪里?

aaaaaaaaaaaaaa
回复

使用道具 举报

2#
发表于 2005-11-14 22:11:11 | 只看该作者

帮我看看,错在哪里?

你错在结构化上面,什么叫结构化,得学习学习Basic,要知道,老盖子对Basic是非常狂热滴,因此,在DOS中仅有的这么几个函数中,也必须遵循结构化,大致画个图,你自己看看
              1-1    --------+
              2-1    ------+ |
              3-1    ----+ | |
              4-1    --+ | | |
                       | | | |
+--------    4-2    --+ | | |
| +------    3-2    ----+ | |
| | +----    2-2    ------+ |
| | | +--    1-2    --------+
| | | |
| | | +--    1-3
| | +----    2-3
| +------    3-3
+--------    4-3
这就是结构化,希望你能看明白,下面是我编的
@echo off
echo.
echo           GHOST选择菜单
echo           1、 ghost8
echo           2、 netghost
echo           3、 go to dos
echo           4、 reboot
choice /c:1234  
if errotlevel 4 goto reboot
if errotlevel 3 goto gotodos
if errorlevel 2 goto netghost
if errorlevel 1 goto ghost8
:ghost8
ghost.exe
goto end
:netghost
call nghost.bat
goto end
:gotodos
goto end
:reboot
rb.com
goto end
:end
看出来你的错误没有?除了结构化上面的错误,下面说说语法上面的错误
第一处,echo:想用Echo留一行空白,不能直接输入Echo,否则屏幕上会显示当前Echo的状态,也就是在屏幕上显示Off,应该为Echo.
第二处,go to dos:段号中间不可用空格,用go_to_dos、gotodos等都可,就是不能用空格
第三处,nghost.bat:在批处理中调用其他批处理,不能直接输入filename.bat来执行,否则在执行完毕子批处理后不能返回继续执行母批处理,应该使用Call来调用子批处理
第四处,goto end:你到处都有goto end的语句,但是你:end这一段呐?没有段号啊
楼主的DOS水平需要加强,建议楼主到这个帖子去好好看一看:
http://bbs.wuyou.net/cgi-bin/topic.cgi?forum=36&topic=233&show=0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-9-24 19:13

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表