mIRC Homepage
Posted By: CaNNoN $read / *string* / line problem - 27/07/04 08:56 PM
hiho.. i have the followning problem..

Code:
$read(file.txt, w, *string*) 


returns the whole line include *string* .. but - the problem - how can i get the line of *string* in the file.txt ?

thx in advance
--CaNNoN
Posted By: tidy_trax Re: $read / *string* / line problem - 27/07/04 08:59 PM
Code:
$read(file.txt, w, $+($chr(42),string,$chr(42)))

Posted By: CaNNoN Re: $read / *string* / line problem - 27/07/04 09:19 PM
thx for your help.. but it returns the same as my line shocked
Posted By: tidy_trax Re: $read / *string* / line problem - 27/07/04 09:21 PM
Code:
$read(file.txt, r, \*string\*)
Posted By: CaNNoN Re: $read / *string* / line problem - 27/07/04 09:26 PM
now comes

Code:
* /echo: insufficient parameters (line 6, script3.mrc)
Posted By: tidy_trax Re: $read / *string* / line problem - 27/07/04 09:35 PM
Code:
//echo -a $read(versions.txt, r, dispatch\*)


The above works fine, so you might have to paste exactly what you're typing.
Posted By: CaNNoN Re: $read / *string* / line problem - 27/07/04 09:44 PM
ic.. but.. i need not the complete line from the txt file .. i need the line number

the txt file contains (e.g.):
Code:
this is the first line..
..second line..
..third line... 


$read(file.txt, r, string\*) returns.. "..second line.."

and what i need would be "2" .. $read(file.txt,2) -> "..second line.."

..sorry for my bad english :]
Posted By: tidy_trax Re: $read / *string* / line problem - 27/07/04 10:02 PM
.echo -q $read(file.txt, r, string\*)
echo -a $readn
© mIRC Discussion Forums