My goal is to control an application from VB.NET. There is no API, and I do not have the source, only the compiled EXE file. Is there a way to find the opened application, find a button within the application, click a button and know it was clicked? Is there a way to read the contents of a textbox within the application?
Share
Yes, with Windows Vista (or Windows 7, or Windows Server 2003 and later) there are “UI Automation” APIs.
There are managed options; System.Windows.Automation is one, shipped with .NET 3.0, as part of WPF… Though
System.Windows.Automationwas shipped as part of WPF, it does not require that the target application uses WPF.You can read more:
System.Management.Automation.dll(an alternative toSystem.Windows.Automation).System.Windows.Automationto automate the Paint.NET program (C#).System.Windows.Automation