Hi All,
I want to place an image on active document from local drive without opening any dialog box. I tried below code but it is not working.
const result = await batchPlay(
[
{
_obj: "placeEvent",
ID: 2,
null: {
_path: "D:\\sampleProject\\UXPicons\\watermark.svg",
_kind: "local"
},
freeTransformCenterState: {
_enum: "quadCenterState",
_value: "QCSAverage"
},
offset: {
_obj: "offset",
horizontal: {
_unit: "pixelsUnit",
_value: 0
},
vertical: {
_unit: "pixelsUnit",
_value: 0
}
},
antiAlias: true,
_options: {
dialogOptions: "dontDisplay"
}
}
], {
synchronousExecution: false,
modalBehavior: "fail"
});
Is there any way to place an image on document without opening any dialog box?