Index: /trunk/FACT++/src/Readline.cc
===================================================================
--- /trunk/FACT++/src/Readline.cc	(revision 14068)
+++ /trunk/FACT++/src/Readline.cc	(revision 14069)
@@ -74,4 +74,5 @@
 int         Readline::fScriptDepth = 0;
 std::string Readline::fScript;
+std::string Readline::fExternalInput;
 
 // --------------------------------------------------------------------------
@@ -307,4 +308,13 @@
 void Readline::EventHook()
 {
+    const string cpy = fExternalInput;
+    fExternalInput = "";
+
+    if (!cpy.empty())
+    {
+        rl_replace_line(cpy.c_str(), 1);
+        rl_done = 1;
+    }
+
     const string p = GetUpdatePrompt();
     if (p.empty())
Index: /trunk/FACT++/src/Readline.h
===================================================================
--- /trunk/FACT++/src/Readline.h	(revision 14068)
+++ /trunk/FACT++/src/Readline.h	(revision 14069)
@@ -31,4 +31,6 @@
     static int  fScriptDepth;
     static bool fStopScript;
+
+    static std::string fExternalInput;
 
     /// Static member function which are used to adapt readline to ncurses
@@ -110,6 +112,8 @@
     static bool  IsScriptStopped() { return fStopScript; }
     static int   GetScriptDepth() { return fScriptDepth; }
+    static void  SetExternalInput(const std::string &inp) { fExternalInput = inp; }
 
     static std::string GetScript() { return fScript; }
+    static std::string GetExternalInput() { return fExternalInput; }
 
     int GetLine() const { return fLine; }
