Sending input to the commandline

I’m investigating a project that I hope will aid my Rhino development education. The gist of the project is discussed here:

The goal now is to interact with the Rhino command line. I’ve looked at a couple of threads regarding RhinoApp.RunScript(), but it seems like overkill for my needs - my plugin would never deal directly with the file’s database, just the command line. But is RunScript the correct way to proceed?

The panel Calculator has the exact button I’m looking for. Does the code behind the Calculator’s “Go” button use RunScript?

This should be the RhinoCommon equivalent to Calc’s GO button:

public static void Go(string str)
{
  if (!string.IsNullOrEmpty(str))
  {
    RhinoApp.SendKeystrokes(str, true);
    RhinoApp.SetFocusToMainWindow();
  }
}

Ah ha, that looks comfortably straightforward.

I’ll give it a go and report back how I fare. Thank you.

I fared well. Thanks again.

It’s getting fun, fast. :slight_smile: