I can't seem to find a definite answer about how to run an extendscript script using nodejs.
My use case would be something like: - run nodejs script from cli, e.g. `node src/action.js`
- in nodejs file it'd run a subprocess lanching an extendscript script (e.g. create an empty doc, add a hello world text layer it) It'd be great if I could also pass some params to be used in the the extendscript file (e.g. text content for layer).
Is this possible? I'm on mac, extendscript toolkit is not available by the looks of it.
Control Photoshop in the background via node.js? If so, implement the code that responds by creating a client that responds to server requests inside the Photoshop panel via websocket or socket.io.
Two types of development are possible.
[General Web Development] 01. Implement a server that responds to client events for server requests using socket.io and socket-io.client. In response, certain functions can be executed via the CSInterface's evalScript.
[Socket response method in ExtendScript] As far as I know https is not supported.
02. ExtendScript in Photoshop listens for requests on a specific port via a supported socket object. You need to set your headers carefully. When the server sends a query to a specific port, the waiting client executes the code in response.