Question

I'm creating a C# program and I need to control another application. I found this example, but it doesn't really work for me (or at least I can't make it work).
1) The application is already running (so I can't use Application application = Application.Launch("foo.exe");
2) It has a textbox and I need to read what's written in it.
3) Then I want to press one of its buttons (This can be done with that: Button button = window.Get<Button>("save"); button.Click();

I also searched Google, but I didn't find anything working.
Can you help me? Thanks in advance.

Was it helpful?

Solution

The documentation doesn't mention it, but Application.Attach() allows you to access a program that is already running. From there, I would expect everything would work as documented.

OTHER TIPS

Maybe you can look into White's documentation, especially this link to start with: Getting window + Performing special operations on a window

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top