Use Photoshop JavaScript to Execute System Command

2019-08-29 05:05发布

问题:

I'm using Photoshop to automate processing images using action sets. I have added javascript to one of my action sets. I want to issue a windows command line prompt using the javascript. Is this possible? Is there some type of system_exec() function for doing this?

Edit: Here's an easy test

app.system("mshta javascript:alert(\"Hello World\");close();");

回答1:

You can do this:

app.system("some Windows command")

E.g.

app.system("echo hi > C:\hi.txt")