Run extendscript from uxp

Heyo, I’m aware that the plan is to remove CEP but since I’m in a studio setting we can lock version if we actually need to make that not happen.

Docs feel like they are lacking for starters.

The manifest 5 doc saying

  • fullAccess: Allows the plugin to inspect, modify, and delete files to which you have access on all volumes attached to this device. The user will be required to consent before installation or update.

but then giving no actual indication of how to perform the usage as the docs for filesystem don’t explain it outside of the ones that were already there which don’t allow you to access the full file system (along side another topic from a month ago asking how to do it Access arbitrary file )

One of my current frustrations is that I need to automate saving a psd + clut ideally without user intervention as I know where it needs to live but that doesn’t seem possible via uxp but I know for a fact it’s possible in extendscript as I wrote CEP extensions specifically to handle auto saving various image types out.

Even with batchplay “seemingly” being there to bridge the gap in some ways, I would have expected that getting an actionJSON for saving a psd and being able to plug that into batchplay should work but it doesn’t and throws other totally undocumented errors… and I expected that one of the issues was just having to fill in the activeDoc.id as the id but that didn’t work either
const saveresult = await executeAsModal(async () => { // In the modal state now const result = await app.batchPlay( [ {"_obj":"save","as":{"_obj":"photoshop35Format","maximizeCompatibility":true}, "documentID":app.activeDocument.id, "in":{"_kind":"local","_path":"D:/MyFolder/My.psd"}, "lowerCase":true } ]); });
From what I’ve seen around the forums/docs there obviously should be a “token” in the _path but making that doesn’t seem to work from the forum post from Adobe itself either…

The docs website search function seems to be completely broken
Proof : even typing in “storage” returns no results which is obviously wrong (since before I searched this I was ON the storage page…)

I had an example before this which was even worse, as it said it had results but clicking on the left bar to show them still said “no results” which makes absolutely 0 sense…

Not trying to be in a ranty mood, but I spent years trying to sort out extendscript’s api and when the thing replacing it feels like it’s in a worse state after a while of being out it just feels like we should have some more movement on it to at least bring it to parity.

Maybe some more work on making it not just “push things through batchPlay cause people were fine having to hate life and use actionDescriptors/the listener plugin to code” and actually having functions to call directly on doc/layer etc. as we did before (and in most api’s)…Even if that at a low level is just wrapping a batchPlay call if it makes working in PS plugin land better it feels like a worthwhile investment…

3 Likes