mIRC Home    About    Download    Register    News    Help

Print Thread
#180600 11/07/07 10:29 PM
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
I don't know if it's bug or not.
I'm trying to use "filter -kng", specifying an alias which is the one that contains the filter command :

alias ex filter -kng file ex /pcre/

I use a "if ($1 !isnum)" statement coupled with an "else" statement to determine whether I do call the alias manually or the filter command does,
and I'm confused seeing that "echo $1" displays the whole line and not only the number that the 'n' filter flag adds.
Instead, using $token($1,1,32) displays the number only.ks.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #180603 11/07/07 11:09 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It has always worked like that and rightfully so imo; by storing the entire line in $1, multiple spaces are preserved (they wouldn't be if the line was tokenized to $1-).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Wims #180608 12/07/07 12:08 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you don't care about multiple spaces, then you may want to consider just using /tokenize to split it into parts.


Invision Support
#Invision on irc.irchighway.net
qwerty #180610 12/07/07 12:16 AM
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
ok thx smile


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard