Searches GUI Windows of R and send keys.
Exemple #1
0
        static void Main(string[] args)
        {
            if (args.Length == 0) {
                return;
            }

            try {
                string cmd = args[0];

                RHandler handler = new RHandler();

                if (cmd == "donothing") {
                    handler.connect();
                }
                else if (cmd == "submitinput") {
                    string[] text = readInput();
                    handler.connect();
                    handler.submit(text);
                }
                else if (cmd == "pasteclipboard") {
                    handler.connect();
                    handler.sendPasteClipboard();
                }
            }
            catch (Exception e) {
                Console.Error.WriteLine(e.Message);
                Environment.ExitCode = 100;
            }
            finally { }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                return;
            }

            try {
                string cmd = args[0];

                RHandler handler = new RHandler();

                if (cmd == "donothing")
                {
                    handler.connect();
                }
                else if (cmd == "submitinput")
                {
                    string[] text = readInput();
                    handler.connect();
                    handler.submit(text);
                }
                else if (cmd == "pasteclipboard")
                {
                    handler.connect();
                    handler.sendPasteClipboard();
                }
            }
            catch (Exception e) {
                Console.Error.WriteLine(e.Message);
                Environment.ExitCode = 100;
            }
            finally { }
        }