简体   繁体   中英

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". 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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