mIRC Home    About    Download    Register    News    Help

Print Thread
#80974 27/04/04 10:52 PM
Joined: Apr 2004
Posts: 73
Z
Babel fish
OP Offline
Babel fish
Z
Joined: Apr 2004
Posts: 73
Hey Everyone,

Would it be possible to make $1(), $2(), $3(), etc. like this?:
$2($read(Sampletxt.txt,3))
It would return the second word of line 3 in sample.txt.
And the $1( .. )- etc would still work too.

Thanks,
-Zelda4ever
aka "The Big 'Z'"


/tokenize 32 $gettok($1-,1-,32)
#80975 27/04/04 11:07 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
Try $gettok. For example:

$gettok($read(Sampletxt.txt,3),N,32)

returns the Nth word. You can also use a range for N (example, 1-4 or even just 1-) just as you can with $1-. As for the meaning of the 32, it is the ascii value of space, which is the character that seperates the tokens in this case.

Alternatively, you can /tokenize 32 <line of text> to fill the $1- with your text


If I knew now what I will know then... maybe things will have been different...

Link Copied to Clipboard