I need to save a file which is in an external application using SendKeys.Send()
method. The keys needed to be sent are Ctrl+S.
I wrote the below code, but it does not work:
SendKeys.SendWait("^%s?"); // to get the Save As dialog
Thread.Sleep(5000);
SetForegroundWindow(FindWindow(null, "Save As"));
Thread.Sleep(5000);
SendKeys.SendWait("xyz"); // Sending FileName
I believe you need to use:
Instead of:
Have a look at https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=vs.110).aspx for more information.