mIRC Homepage
Hi folks!

I'm relatively new to this, so I hope I can explain my problem in a way that's not too irritating!

I a bunch of aliases that have 1 of 2 beginning parts of the alias name. For example:

getmodelRegal
getmodelCentury
getmakeBuick
getmakeFord
etc.

listmodelRegal
listmodelCentury
listmakeBuick
listmakeFord
etc.

I made an alias called docat that returns the uncommon part of the name of the aliases listed above. So it returns things like modelRegal or makeBuick

Now, here's the problem, I need to combine the string returned by docat with the common name of the aliases list or get and get it to properly execute the command.

The code I have in there now is like this:

UC $1 $get $+ $docat(%sel) $+ ($1) | return

An example of what I want it to execute after everything is resolved is this:

UC $1 $getmodelRegal($1)

Is there any way to pull this off? The code I have in there doesn't work properly. Any help is greatly appreciated - this one line of code is the difference between efficiency and bloat for me! Thanks in advance!
Try this:

UC $1 $+($,get,$docat(%sel),$chr(40),$1,$chr(41))
Quote:
UC $1 $eval($!get $+ $docat(%sel) $+ ($1), 2) | return


$eval(code, number) makes mIRC evaluate code, number times, in your case, you want it to evaluate twice: once to get the identifier name, and then again to get the value it returns. The use of ! is to prevent the first round of evaluation from trying to evaluate $get as an identifier by itself (The $1 doesn't need it because in the first round of evaluation the $ is preceded by a ( so mIRC doesn't try to evaluate it).
Worked like a charm! Thanks much to both of you!
lol, im no good at the eval commmand, why would you want it?.. whats it do, other than evaluate x, y number of times..?
© mIRC Discussion Forums