挂钩/抓取 .NET 应用程序
我想为万智牌在线创建一个交易机器人。如果这是一个问题,这样做不会违反使用条款,并且存在多个此类机器人的供应商。我最初从 DLL 注入/API 挂钩路径开始,但这不起作用,因为它似乎没有调用任何标准 GDI 函数。我的代码在记事本上运行良好,但在 MTGO_NET 上不起作用。与第三方挂钩库的结果相同。
然后我“放弃”了,决定尝试使用OCR。然而,当我尝试对客户端窗口进行屏幕截图时,会发生这种奇怪的事情:我只能看到游戏的启动屏幕,无论客户端实际显示什么。主窗口设备上下文始终是启动屏幕。我猜测客户端使用单独的设备上下文来实际渲染游戏,并且我必须以某种方式弄清楚该 DC 是什么。有没有人有遇到这个问题的经验?我很乐意接受有关挂钩 .NET 应用程序或如何截取屏幕截图的任何建议。
我正在 Windows Vista Ultimate 64 位上测试所有这些。我尚未在 32 位安装上对此进行测试,但我希望这不是问题。
I would like to create a trading bot for Magic Online. If it's a concern, doing that would not violate the terms of use, and several vendors for such a bot exist. I initially started out with the DLL injection/API hooking path, but that doesn't work as it doesn't seem to call any of the standard GDI functions. My code works fine on Notepad, but does nothing on MTGO_NET. Same result with third party hooking libraries.
I then "gave up", and decided to try to use OCR. However, this weird thing happens when I try to do a screenshot of the client window: I only get the game's splash screen, no matter what the client is actually displaying. The main window device context is always the splash screen. I am guessing the client uses a separate device context to actually render the game, and I have to somehow figure out what that DC is. Does anyone have experience encountering this issue? I would gladly take any advice regarding either hooking .NET applications or how to take a screenshot.
I am testing all this on Windows Vista Ultimate 64 bit. I haven't tested this on a 32 bit installation, but I hope that isn't an issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议你看这里: http://www.mtgnews.com/showthread.php?t =191879
其中提供了“工作”机器人源代码的链接。
谷歌搜索的结果............
I suggest you look here: http://www.mtgnews.com/showthread.php?t=191879
Which provides a link to source code for a 'working' bot.
The result of a google search............