Hi,

What is the syntax for going to a particular line number to start
processing. I want to stop reading at one point in the script and then start
processing at say line number 20 is there a way in VBScript,WMI etc

xor

Re: Go to linenumber by Hal

Hal
Mon Nov 01 18:02:37 CST 2004

you create a sub, then call it

"xor" <xor@discussions.microsoft.com> wrote in message
news:D7914007-A9B6-4995-BFC7-525E28569519@microsoft.com...
> Hi,
>
> What is the syntax for going to a particular line number to start
> processing. I want to stop reading at one point in the script and then
start
> processing at say line number 20 is there a way in VBScript,WMI etc
>
> xor


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.781 / Virus Database: 527 - Release Date: 10/21/2004



Re: Go to linenumber by Al

Al
Mon Nov 01 22:05:13 CST 2004


"xor" <xor@discussions.microsoft.com> wrote in message
news:D7914007-A9B6-4995-BFC7-525E28569519@microsoft.com...
> Hi,
>
> What is the syntax for going to a particular line number to start
> processing.

There isn't one. This is vbscript, not one of those pre-vb basics prevalent
on the early home computers in which the only way to transfer control to
another statement was to GOTO it by its line number. Believe me, *not* being
able to do that is one of the good features of vbscript.

> I want to stop reading at one point in the script and then start
> processing at say line number 20 is there a way in VBScript,WMI etc

So you are reading a file, now, and, when you get to, say, line number 5,
you want to skip lines 6 through 19, and continue reading at line 20 in the
data file? If so, this is quite a different question.

/Al



Re: Go to linenumber by Christoph

Christoph
Tue Nov 02 06:09:59 CST 2004

02.11.2004 00:51, xor schrieb:
> Hi,
>
> What is the syntax for going to a particular line number to start
> processing. I want to stop reading at one point in the script and then start
> processing at say line number 20 is there a way in VBScript,WMI etc

while not stream.AtEndOfStream
'skip lines 6 to 19, resume at 20
if stream.line >= 6 and stream.line < 20 then
stream.skipline
else
stream2.writeline stream.readline
end if
wend

--
Gruesse, Christoph

Rio Riay Riayo - Gordon Sumner, 1979