Exemplo n.º 1
0
        private static void SendKeysToApp(string partialAppTitle, string keys)
        {
            var shell   = new IWshRuntimeLibrary.WshShellClass();
            var app     = (object)partialAppTitle;
            var success = shell.AppActivate(ref app);

            if (success)
            {
                shell.SendKeys(keys);
            }

            Marshal.ReleaseComObject(shell);
        }