mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2012
Posts: 2
N
nico Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Oct 2012
Posts: 2
Good evening fellow mIRC users,

Can anyone help me why the colon is not printed following command:

//tokenize 32 a b | say $* $+ : hi

The result is:
a hi
b hi

Where as I would expect:
a: hi
b: hi

Thank you in advance
   nico, Founder and chairman of the Stop IRC Bullying Foundation

Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Not sure if this is possible. $* is quirky and not really officially supported. $* has to be handled independently of other identifiers since it doesn't follow the standard behavior of simply returning a value.

Joined: Jul 2006
Posts: 4,146
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,146
What happens with $* is that mIRC takes the whole command and its parameter, replaces $* with `~$*, then evaluates the code so "say `~$* $+ : hi", resulting in "say `~$*: hi" and only then, at the end, replaces with the correct parameter from $N, removing any character sticked to it.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
Try:

//tokenize 32 a b | scon -r msg $!active $* $!+ : hi


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Oct 2012
Posts: 2
N
nico Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Oct 2012
Posts: 2
Ah, I see. Thank you guys.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
What's up with the good old while loop through the $gettok()?


Link Copied to Clipboard