MCPcopy Create free account
hub / github.com/annmuor/jnode / executeScriptWithConsole

Method executeScriptWithConsole

jnode-core/src/jnode/robot/ScriptFix.java:88–97  ·  view source on GitHub ↗
(String scriptContent, boolean force)

Source from the content-addressed store, hash-verified

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

Callers 2

testConsoleMethod · 0.95
processScriptMethod · 0.95

Calls 4

executeScriptMethod · 0.95
logMethod · 0.95
outMethod · 0.95
formatMethod · 0.80

Tested by 1

testConsoleMethod · 0.76