Нужно чтоб в другую программу имитировался ввод с клавиатуры, на оф сайте написано как это можно сделать, но почемуто так не работает.
В Spy++ показывает это:
Пишу вот так:
IntPtr calculatorHandle = FindWindow("Windows.UI.Core.CoreWindow", "Калькулятор");
// Verify that Calculator is a running process.
if (calculatorHandle == IntPtr.Zero)
{
MessageBox.Show("Calculator is not running.");
return;
}
// Make Calculator the foreground application and send it
// a set of calculations.
SetForegroundWindow(calculatorHandle);
SendKeys.SendWait("111");
но выдает ошибку что калькулятор не найден, подскажите что я делаю не так.
Windows 10 Pro 1909 x64
Spy++ 16.00.29428 (выпуск x86)
Калькулятор 10.1910.0.0 x64
CalcFrame