#29685 - 2002-09-26 11:18 AM
Readline Query
|
N00NchieS
Fresh Scripter
Registered: 2002-09-23
Posts: 7
|
Hey Guys,
I am pretty new to Kix, here`s my problem. I have a text file within which is a list of computer names on the network which i piped from net view, what i want to do with this is have ReadLine read each line one after another in some sort of loop so that it returns each line of text one after another from the textfile in order, just can`t seem to get my head round this one i`m afraid... doh any help is greatly appreciated ta!
|
Top
|
|
|
|
#29687 - 2002-09-26 11:41 AM
Re: Readline Query
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
The example in the manual does exactly what you are asking for:
code:
IF Open(3, @LDRIVE + "\CONFIG\SETTINGS.INI") = 0 $x = ReadLine(3) WHILE @ERROR = 0 ? "Line read: [" + $x + "]" $x = ReadLine(3) LOOP Close (3) ELSE BEEP ? "Config file not opened, error code: [" + @ERROR + "]" ENDIF
Or have I misunderstood your query?
|
Top
|
|
|
|
#29691 - 2002-09-26 11:56 AM
Re: Readline Query
|
N00NchieS
Fresh Scripter
Registered: 2002-09-23
Posts: 7
|
Hehe doh guess i`m just havin a bad day huh looked at that chm page like 20 times... simple case of RTFM ... oh well cheers for your help neways guyz ... N00NchieS = Oficially blind
|
Top
|
|
|
|
#29692 - 2002-09-27 12:12 AM
Re: Readline Query
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
N00NchieS, Don't worry. If you posted it in one of the other forums you might have got stomped on, but we're more gentle in Starters. The first time, anyway
PS, Welcome to the board.
PPS, "N00NchieS" - crazy monicker!
|
Top
|
|
|
|
#29693 - 2002-09-27 12:25 AM
Re: Readline Query
|
N00NchieS
Fresh Scripter
Registered: 2002-09-23
Posts: 7
|
Cheers,
I knew i had prob done somethin stupid so thas y i posted it in the starters forum.. as i say today i feel like a bit of a badger... expect less silliness in future ...END OF LINE...
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|