China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-05 06:46
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » I want to write a P to query the QQ version number View 2,107 Replies 16
Original Poster Posted 2007-06-29 14:49 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
I want to write a program to query the QQ version number

Path:
QQVERPATH=D:\zouzhxi\geqi\qqVersion.ini

The format of version.ini is as follows:


0691=【QQ2007 Beta3】
0675=【QQ2007 Beta2 Official Edition】
0673=【QQ2007 Beta2 Internal Test Edition】
04C7=【QQ2006 Mobile Edition】
05F9=【QQ2006 New Year Edition sp5】
07D7=【QQ2007 Internal Edition】
0661=【QQ2007 Beta1 Vista】
065F=【QQ2007 Beta1】
063B=【QQ2006】
0639=【QQ2006 Leaked Edition】
0637=【QQ2006 】
062B=【QQ2006 Beta3 SP1】
0627=【QQ2006 Beta3】
0625=【QQ2006 Beta3】
0623=【QQ2006 Beta3】
0621=【QQ2006 Beta2 SP5】
061F=【QQ2006 Beta2 SP3/SP4】
061D=【QQ2006 Beta2 SP2】
061B=【QQ2006 Beta2 SP1】
0611=【QQ2006 Beta2 Traditional Chinese Edition】
060F=【QQ2006 Beta2】
060A=【TM2007 Beta1】
0607=【QQ2006 Beta1 SP4】
05FF=【QQ2006 Beta1 SP2】
05FD=【QQ2006 Beta1 sp1】
05FB=【QQ2006 Beta1】
05F7=【QQ2006 New Year Edition sp4】
05F5=【QQ2006 New Year Edition sp3】
05F1=【QQ2006 New Year Edition】
05E8=【TM2006 New Spring Edition】
05E6=【TM2006 New Spring Edition】
05BE=【TM2006 Preview】
05A5=【QQ2005 SP1】
05A1=【QQ2005 English Edition】
0569=【QQ2005 Beta2 Traditional Chinese Edition】
0597=【QQ2005 Traditional Chinese Edition】
0596=【QQ2005 Beta3 Haifeng Edition】
0595=【QQ2005 Chuanmei Official Edition/Haifeng Edition】
0594=【QQ2005 Elf Workshop IP Display Edition】
0593=【QQ2005 Official Edition】
0592=【QQ2005 Personal DIY Edition】
057D=【QQ2005 Beta3 Elf Workshop IP Display Edition】
057C=【QQ2005 Beta3 Elf Workshop IP Display Edition Simplified Version】
0589=【2005 Beta3 Apple Edition】
0587=【QQ2005 Beta3 Chuanmei Edition】
0585=【QQ2005 Beta3】
0583=【2005 Beta3 Century Hero Edition】
0580=【2005 Sacred Elf Edition】
058F=【QQ2005 Beta3 China Construction Bank Edition】
058B=【QQ2005 Beta3 Patch】
057A=【TM2005 Official Edition】
057F=【TM 2005 Elf Workshop IP Display Edition】
057E=【TM 2005 Official Edition Patch】
0579=【QQ2005 Beta3 Internal Test Edition】
0578=【QQ2005 beta3 Leaked Edition】
0575=【QQ2005 Beta3 Leaked Edition】
0567=【QQ2005 Beta2 Chuanmei Edition】
0566=【QQ2005 Public Security Bureau Monitoring Edition】
...


Now you can find the corresponding QQ version by entering the first four digits before the equal sign

[ Last edited by zouzhxi on 2007-6-29 at 04:04 PM ]
Floor 2 Posted 2007-06-29 14:54 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
What does this mean? Is it wanting to help write it out?
Floor 3 Posted 2007-06-29 15:03 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
Yes...

Because I didn't get it out with FIND...
Floor 4 Posted 2007-06-29 15:13 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
@echo off
set /p a=
for /f "tokens=2 delims==" %%i in ('type 1.txt^|find "%a%"') do echo %%i
pause


Try this. Of course, this is not perfect. If you enter a non-existent version, it will be incorrect.
Floor 5 Posted 2007-06-29 15:22 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
试试这个:)

@echo off
set QQVERPATH=D:\zouzhxi\geqi\qqVersion.ini
echo Please input your version number:
set /p version=
for /f "tokens=1,* delims==" %%a in ('findstr "%version%" %QQVERPATH%') do (
if "%%a" equ "%version%" echo %%b
)
Floor 6 Posted 2007-06-29 15:23 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
Path:
QQVERPATH=D:\zouzhxi\geqi\qqVersion.ini
Floor 7 Posted 2007-06-29 15:27 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
The following very "beautiful" picture appears:


'054C' is not an internal or external command, nor is it a runnable program or batch file.
'054A' is not an internal or external command, nor is it a runnable program or batch file.
'0548' is not an internal or external command, nor is it a runnable program or batch file.
'057F' is not an internal or external command, nor is it a runnable program or batch file.
'0546' is not an internal or external command, nor is it a runnable program or batch file.
'0520' is not an internal or external command, nor is it a runnable program or batch file.
'051B' is not an internal or external command, nor is it a runnable program or batch file.
'051D' is not an internal or external command, nor is it a runnable program or batch file.
'0519' is not an internal or external command, nor is it a runnable program or batch file.
'0518' is not an internal or external command, nor is it a runnable program or batch file.
Floor 8 Posted 2007-06-29 15:33 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
Which one did the LZ test with?

I tested both and they are both fine.
Floor 9 Posted 2007-06-29 15:35 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Version does not exist, then report an error

@echo off
set QQVERPATH=QQVERPATH=D:\zouzhxi\geqi\qqVersion.ini
echo Please input your version number:
set /p version=
for /f "tokens=1,* delims==" %%a in ('findstr "%version%" %QQVERPATH%') do (
if "%%a" equ "%version%" (
set flag=found
echo %%b
goto :EOF
)
)
if not defined %flag% (
echo unknow version :'(
)
Floor 10 Posted 2007-06-29 16:12 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
But there are some with letters... How to handle it....
Floor 11 Posted 2007-06-29 16:17 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
When comparing, /i ignores case sensitivity
Floor 12 Posted 2007-06-29 16:19 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
//But some have letters... How to handle....

@echo off
set QQVERPATH=QQVERPATH=D:\zouzhxi\geqi\qqVersion.ini
echo Please input your version number:
set /p version=
for /f "tokens=1,* delims==" %%a in ('findstr /i "%version%" %QQVERPATH%') do (
if "%%a" equ "%version%" (
set flag=found
echo %%b
goto :EOF
)
)
if not defined %flag% (
echo unknow version :'(
)
Floor 13 Posted 2007-06-29 16:54 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
It doesn't work... I also know that adding /I can make it not case-sensitive.
Floor 14 Posted 2007-06-29 16:56 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
Speechless. Which piece of code exactly didn't work for the original poster?
Floor 15 Posted 2007-06-29 17:02 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline

:SOUSUO
set QQVERPATH="!QQPATH!\!QQ!\Version.ini"
set VER=
CLS
ECHO.
ECHO.You have entered the QQ version query page
ECHO.Enter the version number (4 digits) you want to find in the version number
echo.Enter -RE in the version number to return to the homepage
ECHO.
SET /P VER=Version number:
IF /I == GOTO CHOS
echo.
for /f "tokens=1,* delims==" %%a in ('findstr /I "!VER!" "%QQVERPATH%"') do (
if "%%a" equ "!VER!" (
set flag=found
ECHO.┌───────┬──────────
ECHO.│The version number you queried│!VER!
ECHO.├───────┴─┬────────
echo.│The corresponding version name│%%b
ECHO.└─────────┴────────
pause&GOTO sousuo
)
)
if not defined %flag% (
echo unknow version :'(
)
goto sousuo


I also wrote it like this... I can query by entering 05FF, but entering 05ff returns to the :SOUSUO label and doesn't perform the query....

[ Last edited by zouzhxi on 2007-6-29 at 05:03 PM ]
Forum Jump: