mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 15
C
CaNNoN Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Feb 2003
Posts: 15
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

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
$read(file.txt, w, $+($chr(42),string,$chr(42)))



New username: hixxy
Joined: Feb 2003
Posts: 15
C
CaNNoN Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Feb 2003
Posts: 15
thx for your help.. but it returns the same as my line shocked

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
$read(file.txt, r, \*string\*)


New username: hixxy
Joined: Feb 2003
Posts: 15
C
CaNNoN Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Feb 2003
Posts: 15
now comes

Code:
* /echo: insufficient parameters (line 6, script3.mrc)

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
//echo -a $read(versions.txt, r, dispatch\*)


The above works fine, so you might have to paste exactly what you're typing.


New username: hixxy
Joined: Feb 2003
Posts: 15
C
CaNNoN Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Feb 2003
Posts: 15
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 :]

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
.echo -q $read(file.txt, r, string\*)
echo -a $readn


New username: hixxy

Link Copied to Clipboard