简体   繁体   English

将“点击”消息发送到 Internet Explorer_Server 窗口链接

[英]Sending “click” Message to a Internet Explorer_Server window link

Iam trying to automate a process in a little game which uses Internet Explorer_Server windows with links as "buttons".我试图在一个小游戏中自动化一个过程,该游戏使用 Internet Explorer_Server 窗口和链接作为“按钮”。 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.我设法获得了窗口的句柄并从中获得了 html 代码,但现在我很难向链接发送“点击”或“鼠标按钮按下”事件。 I would appreciate any help with this.我将不胜感激。

You cannot send mouse input directly to the inner controls of an IE window.您不能将鼠标输入直接发送到 IE 窗口的内部控件。 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”窗口的 HWND 开始,询问它的IHTMLDocument2接口( 详见此处),然后使用 Internet Explorer 自己的 DOM 接口根据需要查找链接元素并调用它们的click()方法直接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM