Hi,
I am trying to get the position of the panel on the screen. CEP panels allowed to ask Photoshop by providing panelID:
const panelID = "myceppanel";
const batchPlay = require("photoshop").action.batchPlay;
return batchPlay(
[{ "_obj": "uiInfo",
"_target": { "_ref": "application", "_enum": "ordinal", "_value": "targetEnum" },
"command": "getViewInfo", "viewID": "$flpn",
"panel": panelID,
"_options": { "dialogOptions": "dontDisplay" } }],
{}
);
It would return:
[{"view":{"class":"TCEPPanel","viewID":"$flpn","signature":"$ofcv",
"globalBounds":{"top":0,"bottom":200,"left":0,"right":208},
"shown":false,"visible":true,"type":"view"},"command":"getViewInfo","dontRecord":true,"forceNotify":true}]
While it looks like UXP panels do not allow to use that API (they would trigger " Could not complete your request because a command was not available" error)