mIRC Home    About    Download    Register    News    Help

Print Thread
Colon in //tokenize | say does not work? #239204 02/10/12 10:49 PM
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

Re: Colon in //tokenize | say does not work? [Re: nico] #239208 03/10/12 12:53 AM
Joined: Dec 2002
Posts: 344
D
drum Offline
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.

Re: Colon in //tokenize | say does not work? [Re: nico] #239217 03/10/12 05:51 AM
Joined: Jul 2006
Posts: 3,746
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,746
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.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Colon in //tokenize | say does not work? [Re: nico] #239218 03/10/12 06:21 AM
Joined: Nov 2004
Posts: 809
Jigsy Offline
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 809
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?
Re: Colon in //tokenize | say does not work? [Re: nico] #239222 03/10/12 02:08 PM
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.

Re: Colon in //tokenize | say does not work? [Re: nico] #239226 03/10/12 09:41 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
What's up with the good old while loop through the $gettok()?