如何从 java 调用 .scpt(applescript) 文件并使用方法将参数从 java 传递到 scpt 文件
Runtime.getRuntime.exec()
。
Process result = Runtime.getRuntime().exec(cmdArray);
String[] args = {"/usr/bin/osascript", "/Users/uname/Library/Preferences/WebApp/Local\\ Store/spawn/Terminal.scpt" "args1", "args2" "args3" "false"};
Process result = Runtime.getRuntime().exec(args);