Return to Snippet

Revision: 59750
at September 27, 2012 17:18 by layouterlimits


Updated Code
// photoshop's application directory path has been declared as an environment variable - so we don't need the full path here
String app =  "photoshop";
String scriptpath = ("c:/script/extendscript/example.jsx").replace('/', '\\');
String[] commands = new String[]{"cmd", "/c", "start", "\"\"", app, scriptpath};
try { Runtime.getRuntime().exec(commands); } catch (IOException e) { e.printStackTrace(); }

Revision: 59749
at September 27, 2012 17:17 by layouterlimits


Initial Code
// photoshop's application directory path has been declared as an environment variable - so we don't need the full path here
String app =  "photoshop";
		String scriptpath = ("c:/script/extendscript/example.jsx").replace('/', '\\');
		String[] commands = new String[]{"cmd", "/c", "start", "\"\"", app, scriptpath};
		try { Runtime.getRuntime().exec(commands); } catch (IOException e) { e.printStackTrace(); }

Initial URL

                                

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

Initial Title
Sending ExtendScript via Java

Initial Tags
java

Initial Language
Java