Board logo

标题: [已结]帮忙做出图中的效果... ... [打印本页]

作者: tireless     时间: 2008-7-22 18:20    标题: [已结]帮忙做出图中的效果... ...

总是提示红色的部分



[ Last edited by tireless on 2008-11-29 at 20:17 ]
作者: tireless     时间: 2008-7-22 18:56
说详细一点:

怎样在屏幕上提示“>请输入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 ]
作者: tireless     时间: 2008-7-22 19:15
help... ... (颜色的显示借助 echox)

[ Last edited by tireless on 2008-7-21 at 11:16 PM ]
作者: bat-zw     时间: 2008-7-22 19:38
其它都不难,很容易实现,就是颜色怕要用到findstr /a:了。
作者: bat-zw     时间: 2008-7-22 20:09    标题: 先发个不调用颜色变化的

楼主先看看是这样一个过程不:
@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 ]
作者: bat-zw     时间: 2008-7-22 21:20    标题: 总算搞出来了


@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 ]
作者: ZJHJ     时间: 2008-7-22 21:37
但是没有实际意义
作者: bat-zw     时间: 2008-7-22 21:43


  Quote:
Originally posted by ZJHJ at 2008-7-22 21:37:
但是没有实际意义

是没有实际意义,只是为了好玩才帮楼主写的
作者: recallshan     时间: 2008-7-22 22:16
MINIQQ  啊   没有GUI  感觉不太好  

但滴滴嗒嗒的声音满好听的  不知道是不是靠扬声器弄出来的
作者: tireless     时间: 2008-7-22 22:42
谢谢 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 ]
作者: bat-zw     时间: 2008-7-22 22:50


  Quote:
Originally posted by tireless at 2008-7-22 22:42:
谢谢 zw19750516 的帮助。运行6楼的代码,有以下问题

1. 第一步的提示,如果直接回车跳到第二步了。应该直接回车的话要提示错误:QQ号码必须 ...

楼主自己修改了,这些并不是关键的,最难就是颜色上。。。
作者: tireless     时间: 2008-7-22 22:52
颜色最简单啦,用 echox
作者: 523066680     时间: 2008-7-23 11:30
echox 貌似是外部的  大家都喜欢内部的…… 这样的话比较通用 发到哪里都可以用