中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [已结]帮忙做出图中的效果... ...
作者:
标题: [已结]帮忙做出图中的效果... ... 上一主题 | 下一主题
tireless
银牌会员





积分 2025
发帖 1122
注册 2007-9-5
状态 离线
『楼 主』:  [已结]帮忙做出图中的效果... ...

总是提示红色的部分 [ Last edited by tireless on 2008-11-29 at 20:17 ]


2008-7-22 18:20
查看资料  发短消息 网志   编辑帖子  回复  引用回复
tireless
银牌会员





积分 2025
发帖 1122
注册 2007-9-5
状态 离线
『第 2 楼』:  

说详细一点: 怎样在屏幕上提示“>请输入QQ号码:”,当用户输入号码后,回车,然后提示“>请输入QQ密码:”,输入密码后回车,然后提示“>是否隐身(Y/N):”,这步可直接回车(来回答yes)。这步回车后,要更改标题为“迷你QQ(MiniQQ):1[在线]”(“1”为用户输入的qq号,“在线”是第三步的结果),然后提示 >服务器:219.133.60.27 >随机端口:13892 >获取令牌...>登录...>重定向至:219.133.60.37... >登录... >登陆失败,原因:非常抱歉地通知您,现在是上线高峰时间,暂时不能同时使用更多QQ/TM >请输入QQ号码: 其中, 如果没有输入qq号或输入的不是数字,则提示“错误:QQ号码必须是数字.” 如果没有输入qq密码,则再次提示“>请输入QQ密码:” ...暂时就先问这么点 [ Last edited by tireless on 2008-7-21 at 11:10 PM ]


2008-7-22 18:56
查看资料  发短消息 网志   编辑帖子  回复  引用回复
tireless
银牌会员





积分 2025
发帖 1122
注册 2007-9-5
状态 离线
『第 3 楼』:  

help... ... (颜色的显示借助 echox) [ Last edited by tireless on 2008-7-21 at 11:16 PM ]


2008-7-22 19:15
查看资料  发短消息 网志   编辑帖子  回复  引用回复
bat-zw
金牌会员

永远的学习者


积分 3105
发帖 1276
注册 2008-3-8
状态 离线
『第 4 楼』:  

其它都不难,很容易实现,就是颜色怕要用到findstr /a:了。




批处理之家新域名:www.bathome.net
2008-7-22 19:38
查看资料  发送邮件  发短消息 网志  OICQ (841615149)  编辑帖子  回复  引用回复
bat-zw
金牌会员

永远的学习者


积分 3105
发帖 1276
注册 2008-3-8
状态 离线
『第 5 楼』:  先发个不调用颜色变化的

楼主先看看是这样一个过程不:
@echo off&color 02
:name
cls&title 迷你QQ(MiniQQ):
if defined name goto 1
set /p name=^>请输入QQ号码:
echo %name%|findstr "[^0-9]">nul&&set "name="&&goto wrong
goto password
:1
echo ^>请输入QQ号码:%name%
:password
if defined password goto 2
set /p password=^>请输入QQ密码:
if not defined password goto wrong
goto select
:2 
echo ^>请输入QQ密码:%password%
:select
set "select=y"&set /p select=^是否隐身(Y/N):
if /i "%select%"=="y" set "strong=隐身"&goto next
if /i "%select%"=="n" set "strong=在线"&goto next
goto wrong
:next
echo.&title 迷你QQ(MiniQQ):%name% %strong%
echo ^>服务器:219.133.60.27 ^>随机端口:13892
echo ^>获取令牌...^>登录...^>重定向至:219.133.60.37...
echo ^>登录...&ping /n 5 127.1>nul
echo ^>登陆失败,原因:非常抱歉地通知您,现在是上线高峰时间,暂时不能同时使用更多QQ/TM
set /p choice=^>是否再次尝试(Y/N):
if /i "%choice%"=="y" (goto again) else (exit)
:again
set "name="&set "password="&set "select="&set "choice="&goto name
:wrong
echo 请正确输入!&ping /n 2 127.1>nul&goto name
[ Last edited by zw19750516 on 2008-7-22 at 08:10 PM ]




批处理之家新域名:www.bathome.net
2008-7-22 20:09
查看资料  发送邮件  发短消息 网志  OICQ (841615149)  编辑帖子  回复  引用回复
bat-zw
金牌会员

永远的学习者


积分 3105
发帖 1276
注册 2008-3-8
状态 离线
『第 6 楼』:  总算搞出来了

@echo off&color 0a&mode con cols=82 lines=15
set "str1=登陆失败,原因:非常抱歉地通知您,现在是上线高峰时间,暂时不能同时使用更多QQ或TM"
set "str2=错误,原因:QQ号码应为数字或密码不能为空或选择有误。"
set "sp=set /p= <nul"
:name
cls&title 迷你QQ(MiniQQ):
if defined name goto 1
set /p name=^>请输入QQ号码:
echo %name%|findstr "[^0-9]">nul&&set "name="&&goto wrong
goto password
:1
echo ^>请输入QQ号码:%name%
:password
if defined password goto 2
set /p password=^>请输入QQ密码:
if not defined password goto wrong
goto name
:2
set "pss=%password%"&set /p=^>请输入QQ密码:<nul
:lp 
set /p=^*<nul
set "pss=%pss:~1%
if defined pss goto lp
:select
echo.&set "select=y"&set /p select=^>是否隐身(Y/N):
if /i "%select%"=="y" set "strong=隐身"&goto next
if /i "%select%"=="n" set "strong=在线"&goto next
goto wrong
:next
echo.&title 迷你QQ(MiniQQ):%name% %strong%
echo ^>服务器:219.133.60.27 ^>随机端口:13892
echo ^>获取令牌...^>登录...^>重定向至:219.133.60.37...
echo ^>登录...&ping /n 5 127.1>nul
set /p=^><nul&%sp%>"%str1%"&findstr /a:0c .* "%str1%*"
echo.&echo.&set /p choice=^>是否再次尝试(Y/N):
if /i "%choice%"=="y" (goto again) else (del /q "%str1%" "%str2%"&exit)
:again
set "name="&set "password="&set "select="&set "choice="&goto name
:wrong
echo.&set /p=^><nul&%sp%>"%str2%"&findstr /a:0c .* "%str2%*"
ping /n 3 127.1>nul&goto name
[ Last edited by zw19750516 on 2008-7-22 at 10:24 PM ]




批处理之家新域名:www.bathome.net
2008-7-22 21:20
查看资料  发送邮件  发短消息 网志  OICQ (841615149)  编辑帖子  回复  引用回复
ZJHJ
高级用户





积分 609
发帖 374
注册 2006-8-2
状态 离线
『第 7 楼』:  

但是没有实际意义


2008-7-22 21:37
查看资料  发短消息 网志   编辑帖子  回复  引用回复
bat-zw
金牌会员

永远的学习者


积分 3105
发帖 1276
注册 2008-3-8
状态 离线
『第 8 楼』:  

Originally posted by ZJHJ at 2008-7-22 21:37: 但是没有实际意义
是没有实际意义,只是为了好玩才帮楼主写的




批处理之家新域名:www.bathome.net
2008-7-22 21:43
查看资料  发送邮件  发短消息 网志  OICQ (841615149)  编辑帖子  回复  引用回复
recallshan
初级用户





积分 31
发帖 14
注册 2007-7-31
状态 离线
『第 9 楼』:  

MINIQQ 啊 没有GUI 感觉不太好 但滴滴嗒嗒的声音满好听的 不知道是不是靠扬声器弄出来的


2008-7-22 22:16
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
tireless
银牌会员





积分 2025
发帖 1122
注册 2007-9-5
状态 离线
『第 10 楼』:  

谢谢 zw19750516 的帮助。运行6楼的代码,有以下问题 1. 第一步的提示,如果直接回车跳到第二步了。应该直接回车的话要提示错误:QQ号码必须是数字. 2.这个是我弄错了。在选择是否隐身时,直接回车是“在线”,即选择“N”。 3.当提示完 登陆失败,原因:非常抱歉地通知您,现在是上线高峰时间,暂时不能同时使用更多QQ或TM,还是接着循环>请输入QQ号码: 4.为什么会生成这两个文件:“错误,原因:QQ号码应为数字或密码不能为空或选择有误。”“登陆失败,原因:非常抱歉地通知您,现在是上线高峰时间,暂时不能同时使用更多QQ或TM” ========================================= 显示颜色是不是用 echox 好一点 EchoX 2.6 - (C) 2004-2007 by Bill Stewart (bstewart@iname.com) Usage: echox [-c color | [-f fg] [-b bg]] [-n] [-w width [-r | -e]] message or: echox -l -c Specifies a color (01-FE). -f, -b Specifies the foreground and background colors (0 through F). -n Do not skip to the next line. -w Specifies the message should be 'width' characters wide. -r Right-aligns the message with respect to the specified width. -e Centers the message with respect to the specified width. message The text to be displayed. -l Lists available colors in a table. When specifying colors, the foreground color cannot match the background color. If you specify -c, you cannot specify -f or -b (and vice versa). The message can contain the following escape sequences: ~n (return), ~r (line feed), and ~t (tab). To display a literal '~' if it's followed by n, r, or t, use '~~'. Escape sequences are ignored if -w is specified. [ Last edited by tireless on 2008-7-22 at 02:51 AM ]


2008-7-22 22:42
查看资料  发短消息 网志   编辑帖子  回复  引用回复
bat-zw
金牌会员

永远的学习者


积分 3105
发帖 1276
注册 2008-3-8
状态 离线
『第 11 楼』:  

Originally posted by tireless at 2008-7-22 22:42: 谢谢 zw19750516 的帮助。运行6楼的代码,有以下问题 1. 第一步的提示,如果直接回车跳到第二步了。应该直接回车的话要提示错误:QQ号码必须 ...
楼主自己修改了,这些并不是关键的,最难就是颜色上。。。




批处理之家新域名:www.bathome.net
2008-7-22 22:50
查看资料  发送邮件  发短消息 网志  OICQ (841615149)  编辑帖子  回复  引用回复
tireless
银牌会员





积分 2025
发帖 1122
注册 2007-9-5
状态 离线
『第 12 楼』:  

颜色最简单啦,用 echox


2008-7-22 22:52
查看资料  发短消息 网志   编辑帖子  回复  引用回复
523066680
银牌会员

SuperCleaner


积分 2362
发帖 1133
注册 2008-2-2
状态 离线
『第 13 楼』:  

echox 貌似是外部的 大家都喜欢内部的…… 这样的话比较通用 发到哪里都可以用




2008-7-23 11:30
查看资料  发送邮件  访问主页  发短消息 网志  OICQ (523066680)  编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: