Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interact with an application programmatically

Tags:

winforms

I am likely to be working on a few projects soon where I will need to take data from a file and input that data programmatically into another third-party (not my own) application. One problem: I have no idea how to do this.I will need to enter data (like times on a time sheet, for exampls) Can anyone steer me in the right direction to acquire this skill?

ADDITIONAL SPECS: I wrote the original post late at night so may not have been as detailed as I should have. Here is an example: My client has an ERP app that they use to collect time stamps from the line workers as they perform their jobs and get projects out the door throughout the day. This app does NOT have an API I can use to feed data into. I have heard of a guy who was able to actually push data onto the screen in this app's windows and controls programmatically, such that the data was able to be collected into, say, an Excel worksheet, then effectively uploaded into this app. Sort of a reverse screen-scrape. It's not pretty like an API would be, but it works.

I've seen app's interact with other apps in a similar way. One good example I can think of is SnagIt, the screenshot utility. You can order it to screen capture a window in a particular app, and as you move your mouse around that window, the controls under the pointer will outline in red to indicate which control it will capture for you. I think that is interesting, and probably just a step away from actually being able to type text into such a control.

Thanks for the comments and answers so far, I'm pursuing them all.

like image 883
Mike K Avatar asked Jan 05 '09 08:01

Mike K


1 Answers

You might be able to automate it with an AutoIt script. This is a simple scripting language that hides some of the complexities of sending messages to windows and controls.

like image 197
Adam Neal Avatar answered Sep 26 '22 23:09

Adam Neal