When you run a local script, like ./myscript.sh, you can use
ksc_set TMP_TOKEN '[EXEC.OUTPUT]'
and it will put the output of your script into a temporary token. The [EXEC.OUTPUT] token is the output generated from the previous command line. If you are trying to capture the output of the script into a shell variable, you can do
Depending on your shell, you may also need to export TMPVAR. Also note that the quotes are the back quotes (under the ~ key). I hope this helps and didn't confuse you. If you need any clarification or further explanation, don't hesitate to ask.