处理问题 [英] Process Question

查看:112
本文介绍了处理问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以使用System.Diagnostics.Process来控制命令行程序以检测该程序何时生成消息框,以便我可以模拟单击是/否/确定/取消"并继续在c#中执行程序?

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#?

推荐答案

Windows 3.x编程的浓淡阴影.

答案是不.您可能需要一个测试工具(不要问,不能推荐一个),它将包装应用程序并在其自己的容器中执行它.

您描述的是访问另一个应用程序的内存并进行使用.结束于.NET框架.
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.


否,至少不是您所建议的方法.但是,可以浏览非托管内存并获取所需的内容.但是,这可能并不容易,并且需要学习很多东西.因此,我的建议是在一个解决方案中创建两个项目:命令行程序和Windows程序.给他们一个链接,并使命令行程序通知Windows程序它已完成了某些工作...
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...


这篇关于处理问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆