- :: Update and correction to previous post :: -

mIRC allows to remap built-in commands via aliases, so you can try to change or add yourself own functionality for to this command and completely replace its action.
Thus, you can independently implement many new, interesting and additional functions you need. I think this may be enough to experiment in this direction.

I tried to make my code according to your idea and this is what I got.

Test command: //set -sc %a 2 + 3 -5 * 8,%b a + b,%c,%d % $+ a,%e %d + 1

Code
alias set {
  if (- == $left($1,1)) {
    if ($len($1) > 1) {
      if (c isin $1) {
        var %i 1 | while (%i <= $numtok($2-,44)) {
          var %t $gettok($2-,%i,44), %v $gettok(%t,1,32), %m $gettok(%t,2-,32)
          if (%m != $null) var %m $calc(%m) | else var %m $null
          if (s !isin $1) set $eval(%v,1) %m | inc %i
        }
      }
      if (s isin $1) {
        var %i 1 | while (%i <= $numtok($2-,44)) {
          var %t $gettok($2-,%i,44), %v $gettok(%t,1,32), %m $gettok(%t,2-,32)
          if (c isin $1) { if (%m != $null) var %m $calc(%m) | else var %m $null }
          set -s $eval(%v,1) %m | inc %i
        }
      }
    }
    else echo $color(info) -a * ERROR: required letter for switches are missing.
  }
  else { var %i 1 | while (%i <= $numtok($1-,44)) { set $eval($gettok($1,%i,44),1) $gettok($2-,%i,44) | inc %i } }
}

This is a demo exemple of the method to show how it can be done and of course it can be improved. I think you can handle this on your own.

Warning: If you decide to do this, then you should know that changing the functionality of built-in commands and identifiers at the global level can negatively affect the work of all scripts that also use these commands and identifiers, and lead to unpredictable behavior of your client. Therefore, this should be done with extreme caution, at your own peril and risk, and it is advisable to use only at the local level in the individual scripts you need. For example: "alias -l set { ... }".


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples