使用C#.Net从WebBrowser与Flash对象进行通信 [英] Communicate with Flash object from WebBrowser with C# .Net

查看:165
本文介绍了使用C#.Net从WebBrowser与Flash对象进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让自己成为一个简单的metacafe上传器,而且我正在使用webbrowser来做这件事。
一切都很好用的登录,浏览上传页面等...
我用HtmlElement和setAttribute / Invoke来点击并设置文本字段:

HtmlElement password = wb.Document.All [sPass];
assword.SetAttribute(value,this.password);

现在我有一个问题。要上传一个视频到metacafe,你首先需要点击一个flash按钮的caleld上传。在那里,出现一个窗口选择一个文件,并在您按下确定后,开始上传,您可以输入表单信息。
我的问题是这样的:
如何在没有看到弹出窗口的情况下输入视频文件?知道这是闪光。以下是Flash对象的外观:

http:上面我只复制了上传页面中对我来说很重要的部分。正如你所看到的,一个简单的Flash文件出现。现在我想模拟点击/输入文件,而不显示文件窗口。

任何想法,我怎么能做到这一点?
谢谢

最后,我使用HTTPanalyzer来跟踪Flash应用程序所做的所有请求。
我分析了所有请求,并创建了自己的POST / GET类来完成任务。



所以,每当你不知道后台发生了什么,试试我上面所述的软件,并跟踪所有的http请求。


I am trying to make myself a simple metacafe uploader, and I am using the webbrowser to do that. Everything was working great with loggin in, navigating to upload page etc... I used the HtmlElement and setAttribute/Invoke to click and set the text fields:

HtmlElement password = wb.Document.All["sPass"]; assword.SetAttribute("value", this.password);

Now I have a problem. To upload a video to metacafe, you first need to click on a flash button caleld Upload. There, a window appears to select a file, and after you press OK, the upload begins and you can enter the form information. My question is this: How can I enter the video file without seeing a popup window? Knowing that it's flash . Here is how the flash object looks:

http://www.sodevrom.net/sample.html

Above I copied only the part from the upload page that it's important to me. As you can see, a simple flash file appears. Now I want to simulate the click/enter of file without showing the file window.

Any ideas on how I can do this? Thanks

解决方案

In the end I used HTTPanalyzer to track all the requests made by the flash application. I analyzed all requests and created my own POST/GET class to make things happen.

So whenever you don't know what's going in the background, try the software I stated above and track all http requests.

这篇关于使用C#.Net从WebBrowser与Flash对象进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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