mIRC Home    About    Download    Register    News    Help

Print Thread
Some bug/weird things that i want to clarify #178815 15/06/07 02:13 AM
Joined: Jul 2006
Posts: 3,764
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,764
The first one is with $N identifier, the mirc help file said that we can stick "text" after a $N or $N-M :
//tokenize 32 Ga is Ga | echo -a $1-this_text_will_be_shown

if text contains a number, mIRC will ignore all the characters before it, including the number

//tokenize 32 Ga is Ga | echo -a $1-.72Ga:)
or
//tokenize 32 Ga is Ga | echo -a $1-.72Ga82:)
or
//tokenize 32 Ga is Ga | echo -a $1-this_text_won't_be_shown>9

The second is about $v1 $v2 $ifmatch or $ifmatch2
The example below juste show with $v1 but i've tested with the other :

alias Kitai return $iif(one,two)
alias Wims if (three) echo -a > Ga $Kitai $v1

typing /wims will echo "> Ga two one" whereas $v1 should return three, it seems that $v1 takes the value from the last actual comparaison. Don't know if it's a bug or not but i think $v1 and others should return the value from the last comparaison in the alias itself







Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Some bug/weird things that i want to clarify [Re: Wims] #178816 15/06/07 02:23 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Originally Posted By: Wims
The first one is with $N identifier, the mirc help file said that we can stick "text" after a $N or $N-M :
//tokenize 32 Ga is Ga | echo -a $1-this_text_will_be_shown

if text contains a number, mIRC will ignore all the characters before it, including the number

//tokenize 32 Ga is Ga | echo -a $1-.72Ga:)
or
//tokenize 32 Ga is Ga | echo -a $1-.72Ga82:)
or
//tokenize 32 Ga is Ga | echo -a $1-this_text_won't_be_shown>9


Strange, I never knew that you could add text, I always thought it worked like:


//tokenize 32 Ga is Ga | echo -a $1-2

Which returns: Ga is

Re: Some bug/weird things that i want to clarify [Re: SladeKraven] #178818 15/06/07 02:34 AM
Joined: Jul 2006
Posts: 3,764
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,764
Yes you can use $N-M but you can too stick text : $N-Msome_text


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Some bug/weird things that i want to clarify [Re: Wims] #178820 15/06/07 02:40 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Yeah, I never knew that. I see what you mean about mIRC ignoring all the characters before it, how weird.

Re: Some bug/weird things that i want to clarify [Re: Wims] #178830 15/06/07 10:21 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Originally Posted By: Wims
typing /wims will echo "> Ga two one" whereas $v1 should return three, it seems that $v1 takes the value from the last actual comparaison. Don't know if it's a bug or not but i think $v1 and others should return the value from the last comparaison in the alias itself


Changing that behaviour will break a lot of scripts.

Re: Some bug/weird things that i want to clarify [Re: hixxy] #178832 15/06/07 11:26 AM
Joined: Jul 2006
Posts: 3,764
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,764
Maybe but so : how can you refer to a comparaison in a alias itself ?
In both case of what $v1 refer to, you have to use a variable to stock other comparaison, a little bit annoying.
What i want to know in fact is what mirc should do :] .


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Some bug/weird things that i want to clarify [Re: Wims] #178849 15/06/07 02:41 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Having it use the last comparison seems more appropriate for what most people will use $v1 for. Of course, that means that you can't use $v1 in certain situations. Even so, $v1 is relatively new and people did fine without it, so I'm sure that having to put the comparison back in there instead of using $v1 won't be so bad.


Invision Support
#Invision on irc.irchighway.net
Re: Some bug/weird things that i want to clarify [Re: Riamus2] #178851 15/06/07 02:57 PM
Joined: Dec 2002
Posts: 2,024
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,024
I agree with Wims that these identifiers should be local to the alias/event calling them. Like local variables...

Code:
; Usage: /alias.one
alias alias.one {
  var -s %aliastest = alias one
  alias.two
  echo -a %aliastest <-- alias one
}
alias alias.two {
  var -s %aliastest = alias two
  echo -a %aliastest <-- alias two
}


alias.one sets the local variable %aliastest to the value 'alias one', then it calls alias.two which sets a local variable with the same name %aliastest to the value of 'alias two' but the value of the variable of the same name in alias.one is not changed. I think $v1 and $ifmatch should behave the same way. As far as breaking scripts, so what, scripts can be updated.

~ Edit ~
I would call this part a feature request rather than a bug report.