I need to simulate mouse clicks/touchscreen presses and key presses in Windows 8.1 (.NET 4.5, WPF). This is for crude unattended automation for certain processes/applications (all external to the application I am developing) whereby there is nothing exposed to allow me to do it any other way.
A few years ago in .NET 2.0 and WinForms I did something similar using the SendInput
API.
Is that still the de-facto method to achieve this in .NET 4.5 and WPF, or is there something newer that has come along, or maybe even a WPF wrapper for SendInput
?