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-11 13:41
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Please provide the specific content in Chinese that needs to be translated so that I can carry out the translation according to the requirements. View 1,485 Replies 3
Original Poster Posted 2008-01-06 23:30 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
Format
Interference line
AA:[BB](CC)DD EE
Interference line
Interference line
N lines
AA:[BB](CC)DD EE
Interference line
....omitted

Need the fastest and most convenient VBS code to get the string at position CC, where AA is a fixed string

I know it's very convenient to get the value with bat, but mixing two scripts takes up a lot of system resources

Also, how does VBS operate databases??
Floor 2 Posted 2008-01-07 22:37 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
Floor 3 Posted 2008-01-08 00:40 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
21-year member
UID 44210
Status Offline
For text database
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("Test.txt",1)
While not f.AtEndOfStream
strR = f.ReadLine
if instr(strR,"AA") > 0 Then
strR = Split(strR,"(")
str = Split(strR(1),")")
msgbox str(0)
End If
Wend
f.Close
Floor 4 Posted 2009-02-24 11:23 ·  中国 陕西 西安 电信
新手上路
Credits 2
Posts 2
Joined 2009-02-21 17:13
17-year member
UID 139468
Gender Male
Status Offline
Originally posted by zh159 at 2008-1-8 00:40:
Applicable to text databases
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fso.OpenTextFile("Test.txt",1)
While not f.AtEndOfStream
strR = f.ReadLine
i ...


Learned
Forum Jump: