通过web浏览器在C#中发送模拟点击嵌入在HTML flash对象 [英] Sending simulated click via WebBrowser in C# to flash object embedded in HTML

查看:187
本文介绍了通过web浏览器在C#中发送模拟点击嵌入在HTML flash对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直没能找到一种方法来发送模拟点击的网站上,我使用的WinForms WebBrowser控件访问一个Flash .SWF应用程序。

I have not been able to find a way to send a simulated click to a flash .SWF application on a site I'm visiting using the WebBrowser control in WinForms.

虽然我关于这个问题的阅读无数的帖子,似乎没有多少信息流传在互联网上。我在这里发现,从技术上提供了我的问题的答案的唯一资源是:

Though I've read countless posts on the subject, there seems to not be much information floating around on the internet. The only resources I've found here that technically provide answers for my question are:

<一个href=\"http://stackoverflow.com/questions/4009479/communicate-with-flash-object-from-webbrowser-with-c-sharp-net\"标题=阅读包>阅读包 - 此链接推荐阅读从Flash应用程序发送的数据包,可能是我唯一的工作液

Reading Packets - This link recommends reading the packets sent from the flash application and might be my only working solution.

Requiement:我不希望直接使用ActionScript进行沟通,以获得我的结果。我只是希望它盲目地点击Flash影片,并等待事情发生。

如果这是不可能的,我想反正反馈。谢谢!

If it is not possible, I'd like feedback anyway. Thank you!

更新:(3/23/2012 - 23/3/2012)

由于没有反馈,我想我会发布更新

Since no feedback, I figured I'd post an update

我清盘只是嗅着由.SWF发送的数据包,然后通过webBrowserObject.Navigate方法发送相同的数据。不管怎样,谢谢!

I wound up just sniffing the packets sent by the .SWF, and then sent that same data via the webBrowserObject.Navigate method. Thanks anyway!

更新:2012年3月31日 - 31/3/2012

彼时带来起死回生我对是否要使用SendMessage函数或PostMessage的发送一个实际的点击窗口而不劫持鼠标古老的话题。这似乎有益的物理和模仿点击作为程序选项/功能,所以我结束了实现物理的点击,以及通过PostMessage的。我所做的是:一把抓起WebBrowser.Handle手柄,通过手柄环,停在了互联网Explorer_Server循环处理,然后PostMessage的()在坐标D A双击它指定

Wound up bringing back to life my old debate of whether or not to use SendMessage or PostMessage to send an actual click to the window without hijacking the mouse. It seemed beneficial to have both the physical and imitated clicks as options/features for the program, so I wound up implementing the physical click as well, via PostMessage. What I did was: Grabbed the handle from the WebBrowser.Handle, looped through the handles, stopped looping at the "Internet Explorer_Server" handle, and then PostMessage()'d a double click to it at the coordinates specified.

我希望这是更新的人谁在读了关于如何发送点击,WebBrowser控件没有一个DOM元素调用模拟点击帮助。

I hope this update is helpful for anyone who is reading up on ways to send clicks to the WebBrowser control without invoking a simulated click on a dom element.

推荐答案

有你在看着的 http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx

这篇关于通过web浏览器在C#中发送模拟点击嵌入在HTML flash对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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