I think fairly rarely you would first add variable names to the string and then start replacing those with the values, but you could do it with Eval Insert.
Better option would be to directly add those values there. Example below has both options, first adds ¤Default1¤ and so on and replaces those by using Eval Insert Into (see scripting index), next one is using Associative array. Associative array is using the strings which are to be replaced as keys and values are the new values (I would use second option).
Names Default To Here(1);
str = "\[<ak:Unit X="0" Y="1" Id="U33">]\";
new_str = Substitute(str, "\!"0\!"", "\!"¤Default1¤\!"", "\!"1\!"", "\!"¤Default2¤\!"", "\!"U33\!"", "\!"¤Default3¤\!"");
Default1 = "test1";
Default2 = "test2";
Default3 = "test3";
Write("Eval Insert into: \!N");
Eval Insert Into(new_str, "¤");
Write(new_str);
Write("\!N\!NAssociative Array:\!N");
aa_replace = Associative Array();
aa_replace["\!"0\!""] = "\!"test1\!"";
aa_replace["\!"1\!""] = "\!"test2\!"";
aa_replace["\!"U33\!""] = "\!"test3\!"";
new_str2 = Substitute(str, aa_replace << get keys, aa_replace << get values);
write(new_str2);
-Jarmo