await require("photoshop").core.executeAsModal(currentlayer);
async function setclonestampToolOptions(currenttooloptions) {
const app = require('photoshop').app;
const result = await batchPlay(
[
{
"_obj": "set",
"_target": [
{
"_ref": "cloneStampTool"
}
],
"to": currenttooloptions
}
],{
"synchronousExecution": false
});
}
async function currentlayer() {
let cto = await getCurrentToolOptions();
cto.$StmS = true;
cto.$StmB = false;
await setclonestampToolOptions(cto);
}
await require("photoshop").core.executeAsModal(currentlayer);
now I have used this… but still not working.
Sorry to needle you