Just a suggestion,

var %num = $gettok(First Second Third Fourth,%cnt,32)

is much more readable (and faster, although it doesn't matter here) than

var %num = $iif(%cnt = 1,First,$iif(%cnt = 2,Second,$iif(%cnt = 3,Third,$iif(%cnt = 4,Fourth))))