Execute photoshop jsx script in tank photoshop publish app


Has anybody managed to execute a photoshop jsx script while publishing via the tank photoshop publish app?

I have tried executing the following in a hook

    subprocess.check_call(["C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe", <jsx script>])


But it seems to execute after the publish to shotgun has completed. I am executing pass statement in the exception handler since photoshop exits with a non zero exit status(which leads to a CalledProcessError exception) even when there were no errors while executing the jsx script. 

Thanks in advance.




1 comment

  • 0
    Rob Blau

    Hi there Samsher,

    I've tried a couple of approaches to this, but unfortunately I have not found a clean way to run javascript from actionscript unless the javascript file is included in the extension that is running the code.  The closest I've found is if you are able to record the running of the script as an action, then you could use this call to run that action:


    If this is something that needs to be distributed, then you can put the main logic from the jsx into a library in a shared location and source it from a stub in the Photoshop scripts directory.  Export the recorded action as an Action Set and then load that .atn file up where needed.  Making changes to the stub would require a change on every machine, but changes to the library could be pushed out from a central location.

    That feels somewhat convoluted, but might work for you.


Please sign in to leave a comment.