Hi,

First of all to make this script correct, you need to convert the "[words]" in html format in order to deal with correct other langage characters like õ,é,ñ, etc..
Look at this link for more precision click here

Secondly, for your repeats problem, you just need to create a loop and deal with tokens ($gettok, $numtok, etc).

$numtok(This is a test,32) <= return 4
$gettok(This is a test,1,32) <== return This

Deal with tokens in a loop is quite easy
Code:
;example
alias extoken {
  var %i = 1, %str = This is a test
  while ($gettok(%str,%i,32) != $null) {
    echo 2 -s word %i = $gettok(%str,%i,32)
   inc %i
  }
}


/extoken blah this is a test

Last edited by HadS; 13/06/14 12:37 AM.