发送“点击”到Internet Explorer_Server窗口链接的消息 [英] Sending "click" Message to a Internet Explorer_Server window link

查看:479
本文介绍了发送“点击”到Internet Explorer_Server窗口链接的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Iam试图在一个小游戏中自动化一个过程,该游戏使用带有链接为按钮的Internet Explorer_Server窗口。
我设法获得窗口的句柄,并从它的HTML代码,但现在我很难发送一个点击或鼠标按钮事件的链接。

Iam trying to automate a process in a little game which uses Internet Explorer_Server windows with links as "buttons". I managed to get the handle of the window and also got the html code from it but now I struggle to send a "click" or Mousebuttonpressed event to the links. I would appreciate any help with this.

推荐答案

您无法将鼠标输入直接发送到IE窗口的内部控件。你可以做的是从Internet Explorer_Server窗口的HWND开始,请求它的 IHTMLDocument2 界面(参见此处有关详细信息),然后使用Internet Explorer自己的DOM接口根据需要查找链接元素,并直接调用其 click()方法。

You cannot send mouse input directly to the inner controls of an IE window. What you can do instead is start with the HWND of the "Internet Explorer_Server" window, ask it for its IHTMLDocument2 interface (see here for details), and then use Internet Explorer's own DOM interfaces to find the link elements as needed and call their click() method directly.

这篇关于发送“点击”到Internet Explorer_Server窗口链接的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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