Question
Having trouble with return values from csInterface.evalscript
Hi! I'm trying to get this function to return the value of the result variable, but am have some sync/async problems. Do you know the solution? Will you share it with me? Thanks!
async function executeScript(remoteData, localData, scriptData) {
const script = `evaluationStation("${remoteData}","${localData}","${scriptData}");`
const returnMe = await csInterface.evalScript(script, (result) => {
console.log('This is my result: '+ result);
return result;
});
console.log(returnMe)
return returnMe;
}
