Running extendScript through UXP

I wanted to run some extendScript based scripts through actions from the extension I designed on UXP. (I wanted to try something like this since extendScript cannot be run directly and script calls can be recorded in actions) but when I trigger an action that calls “script” inside, I get the following error. Do you know of a way I can run ExtendScript over UXP?

Short answer - this is not supported in UXP

If Adobe didn’t patch it yet, you might try a workaround. Wrap your action in one more action and try running that from UXP

1 Like

Great! Thank you very much. I have managed to solve the issue by wrapping the script calling action by another.

Keep in mind, this might stop working at any time

1 Like

Hi @dogukanJD , I had the same your issue when running an action in PS containing command “script” .Can you show me how to wrap action in other action using uxp? thanks
BTW: i’m using uxp manifest version 4

Hey @canhpn ,

You can run your extendScript based “scripts” by using actions which capsulated by another action.

What i mean by that is, you should have 2 actions for a single “script” call.

Let the name of the first action be x_action, and this x_action should have the record of opening the “script” in Adobe Photoshop.

If you directly call this recorded x_action, you will encounter the error mentioned above.

However, if you create a new action (y_action) and record it as invoking x_action, and then later call this y_action via UXP,

y_action will call x_action, which in turn will call the script itself.

I hope this helps.

Thanks for replying. I tried this manually by creating a new action on PS and listening to the action containing the script. Call the new action using uxp. it works fine. But I don’t know how to create an action and listen to another action using uxp code. Do you know how to do them? :D. Thanks

I see now. Unfortunately, i havent worked on the creation of actions through UXP.

1 Like

Hi @Karmalakas Have you ever tried wrapping an action in another action using uxp?

Sorry, but I didn’t ever have a need to create an action with UXP. I’d probably just try Alchemist to see what it gives while creating one

1 Like