I would appreciate it if someone can help me with this basic function question.
Here is some code which returns whether the image is RGBColor or something else.
async function imageMode() {
await exeModal(doStuff, {
"commandName": "Please Wait"
});
async function doStuff(executionContext) {
//do stuff here..
const result = await batchPlay(
[{
_obj: "get",
_target: [{
_ref: "document",
_id: 219
}],
_options: {
dialogOptions: "dontDisplay"
}
}], {
synchronousExecution: false
});
const pinned = result[0].mode._value;
console.log(pinned);
}
}
This works fine and outputs the result to the console.
What I am trying to learn is how to call this function anywhere and output the result.