I’m transitioning a large code base of Extend Script code into a UXP environment. Unfortunately UXP is very much still under development, and a number of document operations are not yet functional. For example, layer comp CRUD behavior, but there are likely others. As a workaround, I’ve built the user interface in UXP, and am attempting to continue using Extend Script for the document operations. I am more than happy to depreciate the Extend Script code as UXP’s ambitions are better supported.
The last, and perhaps final, milestone towards a minimum viable product involves using Batch Play to call a JSX file residing within the developer plugin folder (to avoid user input). It was once functioning but is no longer.
If I remove the
await call for
result (an error handling bug?), then I am able to see the promise is rejected for the following reason:
Error: Event: AdobeScriptAutomation Scripts may modify the state of Photoshop. Such events are only allowed from inside a modal scope
If a modal is required, can someone please point me towards a code sample that might help?