|
Problem API Execute loading CScript from United States [60 posts] |
12 year
|
I am trying to upload to RR using the API execute function. The upload is successful except for the script in the CScript module. The quote marks around variable names are appearing as '"e'.
Here is what appears in CScript:
float nsi;
nsi = getFloatVariable("NORMALIZED_SUM_INTENSITY");
float nsr;
nsr = getFloatVariable("NORMALIZED_SUM_R");
Here is what I am uploading to RR:
char* script =
"<CScript_Program>"
"<tab_size_index>2</tab_size_index>"
"<script>"
"float nsi;\n"
"nsi = getFloatVariable(\"NORMALIZED_SUM_INTENSITY\");\n"
"float nsr;\n"
"nsr = getFloatVariable(\"NORMALIZED_SUM_R\");\n"
"</script>"
"<source_mode>gui</source_mode>"
"</CScript_Program>";
|
|
|
Steven Gentner from United States [1446 posts] |
12 year
|
Rud,
Looks like there were two problems with quotation. One was in the API that you are including. The escape routine was not including a semicolon in that escape sequence. We've made that fix and uploaded the API.zip. If you just want to patch the RR_API.cpp file you have (assuming you are using C++) you can just overwrite the RR_API::escape routine to the attached.
Second, the RR api server was not converting that sequence back to an original quote. If you download 2.49.2 that will fix that issue.
Thanks for the report! Hopefully the above fixes will get you back on your way.
STeven.
patch.zip
|
|
|
from United States [60 posts] |
12 year
|
Downloaded both the new RR and API.ZIP and all is well. Thanks...
|
|