$puttok
From Scriptwiki
Overwrites the Nth token in text with a new token.
$puttok(text,token,N,C)
Note that you can specify a negative N.
Example
echo -ag $puttok(This is a moo, test, 4, 32)
This example replaces moo with test and therefor echo's This is a test.
var %text = This is a moo var %replacefrom = moo var %replaceto = test %text = $puttok(%text, %replaceto, $findtok(%text, %replacefrom, 1, 32), 32) echo -ag %text
This example echo's This is a test too, as $findtok() returns the position of moo in the string and $puttok replaces this token with test.