you can use the `ScriptEvaluator` to get a single ...
# scripting
g
you can use the
ScriptEvaluator
to get a single return value from a script, but that's a bit different from capturing all printed output
not sure how to use it though - cc @ilya.chernikov, is there a way to control the value of
CompiledScript.resultField
at the moment ?
i
EvaluationResult
from
ScriptEvaluator
contains a value from the last script line, if it happens to be an expression (you need 1.3.50 to use it though.) as well as the script class instance. I do not see how this should be customizable. How would you like to control it?
g
Just in the way you describe. Looking at the scripting compiler plugin I couldn't see where the value of
resultField
was coming from.
j
Using 1.3.50 is not possible atm. Another (actually better) solution for me would be to apply the script on a receiver. Is it possible ?
Stupid question, that's what is done by default and I just had to get the scriptInstance from the result 🙂
i
@Gary Tierney the documentation is mostly missing unfortunately. We’ll hope to improve on it relatively soon.
g
yep, I can appreciate that -- it's why I try to go digging in the sources instead of asking you lots of menial questions about things that aren't even publicly documented 🙂