It's all in the help file. /help $v1
  • If-then-else statements

    The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.

    Basic format

    if (v1 operator v2) { commands }
    ...
    ...
    ...
    $v1 & $v2

    Returns the first and second parameters of an if-then-else comparison. So, in the case of this comparison:

    if (text isin sometext) { ... }

    $v1 will return "text" and $v2 will return "sometext".


So...
Code:
      if ($did(8).seltext isnum) { %a -r $v1 }[color:gray] | ; <- $v1 = $did(8).seltext[/color]
      if ($did(6).seltext isalnum) { %a %a -g $v1 }[color:gray] | ; <- $v1 = $did(6).seltext[/color]
      if ($did(4).seltext isalnum) { %a %a -s $v1 }[color:gray] | ; <- $v1 = $did(4).seltext[/color]