Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way using System.Diagnostics.Process to control a command line program to detect when said program generates a messagebox so that I can simulate clicking yes/no/ok/cancel and continue on with program execution in c#?
Posted
Comments
Bardy85 17-Sep-10 16:04pm    
Can you give a bit more detail on what exactly you are trying to do? Is this with a web app or just normal windows forms app?

Yummmy shades of Windows 3.x programming.

The answer is ... no. You probably need a testing tool (don't ask, cannot recommend one) that will wrap the application and execute it within it's own container.

What you describe is accessing another applcations' memory and playing with it. This was ended with the .NET framework.
 
Share this answer
 
No, at least not with the method you are proposing. However, it is possible to scan through the unmanaged memory and get the stuff that you want. However, this might not be easy and would require a lot of stuff to learn. Hence, my suggestion is to create two projects in one solution: The commandline program and the windows program. Give them a link and make the commandline program inform the windows program that it has done something...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900