屏幕抓取应用程序窗口并与鼠标和键盘交互

发布于 2024-09-03 07:49:25 字数 640 浏览 3 评论 0原文

有一天,我发现自己沉迷于 Flash 游戏,同时也对这件事感到沮丧。在对游戏感到沮丧的时刻,我想我应该制作一个“机器人”来帮我打败它。好吧,我真的不会,但它让我意识到:我不知道如何与另一个应用程序交互来做到这一点。这让我想到了一个问题:如何截取另一个正在运行的应用程序的屏幕截图并通过键盘和鼠标与其进行交互。理想情况下,解决方案采用托管语言(例如 C#)。

当进行后台阅读时,网络上充斥着关于抓取 HTML 的文章。关于实际屏幕抓取应用程序的文章并不多。

我正在寻找一种与另一个应用程序交互的方法,而不是脚本/宏另一个应用程序。

可以用Xming之类的东西来重定向界面吗? http://www.straightrunning.com/XmingNotes/

也许是终端服务客户端? http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx

The other day I found myself addicted to a Flash game and frustrated by the thing at the same time. In a moment of frustration with the game I thought I would make a 'bot' to beat it for me. Well, I really wouldn't, but it made me realize: I don't know how to interact with another application in a way to do this. Which brings me to the question, how would one take screenshots of another running application and interact with it with the keyboard and mouse. Ideally the solution would be in a managed language like c#.

When doing the background reading the net was drowning with articles on scraping HTML. There were not many articles on actually screen scraping an application.

I'm looking for a way to interface with another application rather than script/macro another application.

Could something like Xming be used to redirect the interface? http://www.straightrunning.com/XmingNotes/

Perhaps a Terminal Services client?
http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

星星的軌跡 2024-09-10 07:49:25

看看 Sikuli,它基本上就是您要找的。然而它是用 Java 编写的。

http://groups.csail.mit.edu/uid/sikuli/

Check out Sikuli, it is basically what you are looking for. It is written in Java however.

http://groups.csail.mit.edu/uid/sikuli/

找个人就嫁了吧 2024-09-10 07:49:25

我最终制作了完成所有这些工作的机器人,并将其记录在帖子

http://www.charlesrcook.com/archive/2010/09/05/creating-a-bejeweled-blitz-bot-in-c.aspx

I ended up making the bot which did all this and documented it in a post

http://www.charlesrcook.com/archive/2010/09/05/creating-a-bejeweled-blitz-bot-in-c.aspx

や莫失莫忘 2024-09-10 07:49:25

我使用 AutoHotKey 进行应用程序自动化。

I have used AutoHotKey for application automation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文