I found the ZOOM value of the current document using Alchemist.
const activeDocument= app.activeDocument;
const {_id} = activeDocument;
const document = await batchPlay(
[
{
"_obj": "get",
"_target": [
{
"_ref": "document",
"_id": _id
}
],
"_options": {
"dialogOptions": "dontDisplay"
}
}
],{
"synchronousExecution": false,
"modalBehavior": "fail"
});
console.log(document);
const {zoom} = document[0];
const doc = document[0];
var option ={
...doc.zoom,
_value:0.02536916221554961 ,
}
const result = await batchPlay(
[
{
"_obj": "set",
"_target": [
{
"_ref": "document",
"_id": _id
}
],
"to":option
}
],{
"synchronousExecution": false,
"modalBehavior": "fail"
});
console.log(result);
my code is not working