Use Photoshop JavaScript to Execute System Command Line Prompt

一笑奈何 提交于 2019-12-12 05:47:33

问题


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")


来源:https://stackoverflow.com/questions/26661822/use-photoshop-javascript-to-execute-system-command-line-prompt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!