Code:
  if (%num == 1) command1
  if (%num <= 2) command2
  if (%num <= 3) command3
  if (%num <= 4) command4
  if (%num <= 5) command5
  if (%num <= 6) command6

I made some assumptions above that %num is going to be 1,2,3,4,5 or 6

making no assumptions below...
Code:
  if (%num == 1) { command1}
  if (%num == 1) || (%num == 2) { command2 }
  if (%num == 1) || (%num == 2) || (%num == 3) { command3 }
  ... or ...
  if ($istok(1 2 3 4,%num,32)) { command4}
  if ($istok(1 2 3 4 5,%num,32)) { command5}
  if ($istok(1 2 3 4 5 6,%num,32)) { command6}


Quote:
Now, what if I have 20 commands?


you have 20 lines of code ?