Hey there – I’m glad you found a solution. Note, however, that this is not going to work long-term, as ExtendScript is not technically supported by UXP. As such, it’s likely that the mechanism you’re using here will stop working. Furthermore, it requires redistributing part of Photoshop (HDRToning.jsx) alongside your plugin, which is also not something you should do.
I’m sure there’s a
batchPlay command to do this equivalent, however, this works just as well:
If this doesn’t fully meet your needs, please describe in more detail how you’re using the HDR Toning feature, and we can help further.