| 86 | } |
| 87 | |
| 88 | public static String executeScriptWithConsole(String scriptContent, boolean force) { |
| 89 | Bindings bindings = new SimpleBindings(); |
| 90 | final JScriptConsole jScriptConsole = new JScriptConsole(); |
| 91 | bindings.put("console", jScriptConsole); |
| 92 | String result = JscriptExecutor.executeScript(scriptContent, bindings, force); |
| 93 | if (result != null){ |
| 94 | jScriptConsole.log(String.format("\n%s", result)); |
| 95 | } |
| 96 | return jScriptConsole.out(); |
| 97 | } |
| 98 | |
| 99 | private void processCommands(FtnMessage fmsg) throws SQLException { |
| 100 | for (String line : fmsg.getText().split("\n")) { |