Did you copy-paste the code? The string [ QUOTE ]
sessionid = DO_GetUniqueString("TOKEN", \"", "\" );");
[/ QUOTE ] does not compile...
The string you list that you are trying to parse
[ QUOTE ]
Set (NEXT_REQUEST_ONLY, POST_DATA, "org.apache.struts.taglib.html.TOKEN", "4a2263f1a9f1b0ed9cd77f2d3adde24f" );
[/ QUOTE ]
is actually a QALoad command. Parsing takes place in the buffer - data returned by the server - not the script you are trying to execute!
You will need to look at the actual HTML returned by the server to create the left/right boundries.
Actually, the website I work on uses struts also. When I convert with Visual Navigator disabled (Options~Convert) most of these are parameterized automatically by convert. Additionally, turn on the Form Fields as Comments and Anchors as comments in the same options and you will most likely see the parameter you are trying to set. This allows you to use DO_GetFormValueByName which works better than DO_GetUniqueString.
Better yet, use the Visual Navigator Variable Wizard to paramterize these. Then you can create a rule which should make it automatic the next script you convert. Unfortunately the application I'm working on does not work w/visual navigator or I would be using that...
Finally, you would use the variable just as in the string you are listing to parse, via the Set command in Visual Navigator script or Do_SetValue function in non-visual script.