Override RunScript command using external access

Hi everyone,

I am developing a software project that can external access Rhino using a C# console application and the Rhino.Inside library. How can I override the RunScript command?

For example, I don’t want the console application to stop when I use the RunScript Grasshopper command. What can I do to keep my application running when RunScript Grasshopper is written? Can you share some examples?

Thanks for your help.