diff --git a/src/frontends/wx/wx_frontend.cpp b/src/frontends/wx/wx_frontend.cpp index 9234469..fbc4889 100644 --- a/src/frontends/wx/wx_frontend.cpp +++ b/src/frontends/wx/wx_frontend.cpp @@ -2,6 +2,7 @@ #include "frontends/wx/wx_frame.hpp" +#include "core/app/script.hpp" #include "core/domain/connect.hpp" #include "core/domain/modules.hpp" #include "core/domain/persist.hpp" @@ -74,8 +75,15 @@ void WxFrontend::BootDispatch(const std::string &raw) { + std::to_string(sys_->connections()->size()) + " connection(s))\n"; } else if (cmd == "source") { - output_ += "source: the wx frontend has no script interpreter " - "(use the tui frontend for scripts).\n"; + ensure_system(); + std::ostringstream out; + app::ScriptResult r = app::run_script(sys_, arg, out); + output_ += out.str(); + if (!r.ok) + output_ += "source: " + r.error + "\n"; + else + output_ += "source: " + arg + " (" + std::to_string(r.lines) + + " line(s), " + std::to_string(r.errors) + " error(s))\n"; } else if (!cmd.empty()) { output_ += "boot: ignored '" + raw + "'.\n"; }