生成C#的Lua参数

我使用_C#制作了一个应用程序,它打开了一个虚拟键盘。我也有一个运行这个键盘的Lua应用程序,两者都能正常运行。在这种情况下,我需要通过命令行从LuaC#_发送一些信息,但我没有成功,有人知道是否可能,如果可能,如何实现?

代码_Lua-_

os.execute('C:\Users\Public\Documents\Keyboard.exe')

代码只是调用可执行文件。

代码_C#-_

namespace WindowsFormsApp2

{
    static class Program
    {

        [STAThread]
        static void Main(string[] args)
        {

            // 测试是否提供了输入参数。
            if (args.Length >= 0)
            {
                Console.ReadLine();
            }

            Console.WriteLine(args.Length);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Keyboard());
        }
    }
}

在这里,我读取控制台,但我没有通过_Lua发送任何代码来通过C#进行读取,在这种情况下,我希望通过Lua发送一个参数,并通过C#接收它,但我不知道如何通过Lua_实现这一点。

点赞