diff --git a/Programs/examples/TestClient/ClientManager.cs b/Programs/examples/TestClient/ClientManager.cs index 6d1e28ce..b3e86914 100644 --- a/Programs/examples/TestClient/ClientManager.cs +++ b/Programs/examples/TestClient/ClientManager.cs @@ -199,15 +199,24 @@ namespace OpenMetaverse.TestClient /// /// /// - public void Run() + public void Run(bool noGUI) { - Console.WriteLine("Type quit to exit. Type help for a command list."); - - while (Running) + if (noGUI) { - PrintPrompt(); - string input = Console.ReadLine(); - DoCommandAll(input, UUID.Zero); + while (Running) + { + Thread.Sleep(2 * 1000); + } + } + else { + Console.WriteLine("Type quit to exit. Type help for a command list."); + + while (Running) + { + PrintPrompt(); + string input = Console.ReadLine(); + DoCommandAll(input, UUID.Zero); + } } foreach (GridClient client in Clients.Values) diff --git a/Programs/examples/TestClient/Program.cs b/Programs/examples/TestClient/Program.cs index 8cc7ec95..d15133e9 100644 --- a/Programs/examples/TestClient/Program.cs +++ b/Programs/examples/TestClient/Program.cs @@ -30,6 +30,7 @@ namespace OpenMetaverse.TestClient UUID masterKey = UUID.Zero; string file = String.Empty; bool getTextures = false; + bool noGUI = false; // true if to not prompt for input string scriptFile = String.Empty; if (arguments["groupcommands"] != null) @@ -50,6 +51,9 @@ namespace OpenMetaverse.TestClient if (arguments["gettextures"] != null) getTextures = true; + if (arguments["nogui"] != null) + noGUI = true; + if (arguments["scriptfile"] != null) { scriptFile = arguments["scriptfile"]; @@ -154,7 +158,7 @@ namespace OpenMetaverse.TestClient ClientManager.Instance.DoCommandAll("script " + scriptFile, UUID.Zero); // Then Run the ClientManager normally - ClientManager.Instance.Run(); + ClientManager.Instance.Run(noGUI); } } }