mIRC Home    About    Download    Register    News    Help

Print Thread
#109640 31/01/05 06:59 AM
Joined: Dec 2004
Posts: 81
N
Babel fish
OP Offline
Babel fish
N
Joined: Dec 2004
Posts: 81
I'm trying to rewrite /tokenize and was curious if I was able to somehow retreive the $1, $2, and so on values from calling /tokenize within this command.

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
$gettok(string,n,32)

see /help $gettok


If it ain't broken, don't fix it!
Joined: Dec 2004
Posts: 81
N
Babel fish
OP Offline
Babel fish
N
Joined: Dec 2004
Posts: 81
I guess I should elaborate some more. Here's an example:

//tokenize 44 a,b,c,d,e | echo -a $1 | echo -a $2
echos a
echos b

now mine
//_tokenize 44 a,b,c,d,e | echo -a $1 | echo -a $2
this results in an error

I am asking if it's possible for me to fill the $N-M identifiers so they'll be able to return values using [b]my[b] /_tokenize.

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
This happens because if you tokenize values inside your /_tokenize alias, the $1, $2, etc are local to that alias.


New username: hixxy

Link Copied to Clipboard