使用C#.Net从WebBrowser与Flash对象进行通信 [英] Communicate with Flash object from WebBrowser with C# .Net
问题描述
一切都很好用的登录,浏览上传页面等...
我用HtmlElement和setAttribute / Invoke来点击并设置文本字段:
HtmlElement password = wb.Document.All [sPass];
assword.SetAttribute(value,this.password);
现在我有一个问题。要上传一个视频到metacafe,你首先需要点击一个flash按钮的caleld上传。在那里,出现一个窗口选择一个文件,并在您按下确定后,开始上传,您可以输入表单信息。
我的问题是这样的:
如何在没有看到弹出窗口的情况下输入视频文件?知道这是闪光。以下是Flash对象的外观:
http:上面我只复制了上传页面中对我来说很重要的部分。正如你所看到的,一个简单的Flash文件出现。现在我想模拟点击/输入文件,而不显示文件窗口。 任何想法,我怎么能做到这一点? 最后,我使用HTTPanalyzer来跟踪Flash应用程序所做的所有请求。 所以,每当你不知道后台发生了什么,试试我上面所述的软件,并跟踪所有的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屋!
谢谢
我分析了所有请求,并创建了自己的POST / GET类来完成任务。