welcome everybody
What is wrong with the code I used
It does not work
I want it to fulfill the condition.
THE CODE:
const myDepth = async () => {
const result = await batchPlay(
[{
"_obj": "get",
"_target": [{
"_property": "depth"
},
{
"_ref": "document",
"_enum": "ordinal",
"_value": "targetEnum"
}
],
"_options": {
"dialogOptions": "dontDisplay"
}
}], {
"synchronousExecution": false,
"modalBehavior": "fail"
});
var documentDepth = result[0].depth;
app.showAlert(`The Document is in ${documentDepth.toString()} bits`);
}
//The condition....
if (myDepth() === 16) {
// logic for 16 bit
} else {
// logic for 8 bit or other
}
Regards
Mohamed Fathy