Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interfacing a GUI application with a C program

Status
Not open for further replies.

sobeeh

Instructor
Apr 10, 2005
1
US
I'm trying to execute an application (simulator) using a system call from my program. Once the application (simulator) starts, I want my program to perform certain tasks on the GUI of the simulator: fill in certain fields, start the simulation, collect the results, and close the application. In essence, I need to emulate the keyboard stokes on the GUI of the simulator using my C program. I must interface to the GUI since I only have the executable available to me. Can any one recommend a way to perform this? Any help would be greatly appreciated.
 
Do a search for CBT hooks on the net. You may be able to hook in to the Computer Based Training stuff which tends to emulate keystrokes.

You may be able to pipe some text into it - works on Unix but I've never gotten it to work on Windows.
 
Send messages to the window controls - EM_SETSEL, WM_CHAR for edit controls, WM_ACTIVATE, WM_LBUTTONDOWN, WM_LBUTTONUP for buttons, WM_QUIT - to stop the program.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top