mIRC Home    About    Download    Register    News    Help

Print Thread
#175597 25/04/07 07:10 PM
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
when i put $* in the editbox and i evaluate it with tabulation, it return `~$* in the editbox instead of $* ( because it should not be evaluated )


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2006
Posts: 166
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
You might find this useful.


Kind Regards, blink
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
This bug report has nothing to do with mishandling $*

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks this has been fixed for the next version.

Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
It's great but it's very strange how $* works.
I really would like to see $* works as the other identifier, without odd things or at least have an explanation about why he works like that.





#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
$* was added before the scripting language supported while and goto loops, to allow scripts to iterate a command over a set of values. $* is purposefully no longer documented. Instead of $* you should use while or goto loops.

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
For us mIRCscripts obsessed why exactly does it evaluate to`~$* ?
I have always wondered that.


$maybe
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
i already know that but $* is more faster than a while smile
There is no chance to see $* works correctly ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
How are you claiming that $* does not work as intended, aside from the $*<tab> bug that was already reported as fixed.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Hum, just because $* doesn't works like other $ident, you can't use it without space around it, have to use /scon -r to be evaluted.I know that it's not a bug, i just would like can use it whitout scon -r and space, like the other.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Quote:
why exactly does it evaluate to `~$* ?

In short, the `~$* text that $* evaluates to, acts as a marker to allow for search-and-replace of this marker (with $1, $2, etc) after the evaluation of the line is fully complete. What the marker looks like is not important, as long as it can't reasonably be the result of the evaluation of anything other than $*. `~$* is "weird" enough to fulfill that requirement.


Saturn, QuakeNet staff
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
And here's a confirmation of this, along with two other (mostly unimportant) observations:
//tokenize 32 a b c | var %a = `~$* | echo -a $* :: %a :: `~$*THIS_WILL_BE_GONE :: NOT_REPLACED:`~$*

On a related note, the following doesn't work as expected:
//tokenize 32 a b c | echo -a $* $upper(d e)
(gives "`~$* D E")
This happens when there's a literal space in an identifier parameter.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Even though this topic is dealing with editbox, I gather this is related to why I was seeing only the 1st nick instead of all 3 highlighted nicks when I add line to nicklist menu:

.Op +o ( $$1 $2 $3 ): mode # +ooo $$1 $2 $3

and when I changed to:

.Op +o ( $* ): mode # +ooo $$1 $2 $3

I was seeing the `~$* in the menu label, regardless whether 1 or 3 nicks are highlighted.


Link Copied to Clipboard