mIRC Homepage
Is it possible to set a variables with other variables within the string? I.E.

set abc $1 $+ hello $+ %2 $+ how are you?

???
Yes.

alias test {
var %1 = apple, %2 = tree
set %var I love this %2 it has so many %1
echo -a %var
}
That said, it will set the variable using the contents of the variable you include. It will not leave the variable there for you to manipulate later. If you *do* want to manipulate the variable later, you need to use $eval().

Example:
Code:
var %t = a test
var %c = this is $eval(%t,0)
var %t = not a test
echo -a $eval(%c,2)


That would let you change %t at any time and it would change the output of %c without resetting %c. Note that you may want to be using /set instead of /var depending if you want it global or not. It works the same, though.
© mIRC Discussion Forums