Sending ExtendScript via Java

/ Published in: Java
Save to your folder(s)

Just a simple code snippet that uses cmd to send an ExtendScript to an application like Photoshop® or InDesign®.

Copy this code and paste it in your HTML
  1. // photoshop's application directory path has been declared as an environment variable - so we don't need the full path here
  2. String app = "photoshop";
  3. String scriptpath = ("c:/script/extendscript/example.jsx").replace('/', '\\');
  4. String[] commands = new String[]{"cmd", "/c", "start", "\"\"", app, scriptpath};
  5. try { Runtime.getRuntime().exec(commands); } catch (IOException e) { e.printStackTrace(); }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.