VC用SendMessage向Internet Explorer_Server发送消息问题 ::SendMessage(h1,WM_LBUTTONDOWN, MK_LBUTTON, 0X000D000F); ::SendMessage(h1,WM_LBUTTONUP,MK_LBUTTON,0X000D000F);向IE的Internet Explorer_Server发送鼠标左键单击消息,用Spy++的确是发送了一个鼠标单击。但那个按钮没反应。我向计算器的子窗口发送消息能成功!不知道是什么原因? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SendInput直接模拟鼠标这个貌似不能后台操作的吧。我要可以后台操作的! 如果要操作网页可以考虑用cwebbrowser做个简单的浏览器然后做页面解析 现在我用的是这个:获取网页元素。先用IHTMLDocument3::getElementById 得到 IHTMLElement然后根据不同的类型,从IHTMLElement QueryInterface 不同接口input:IHTMLInputElement,IHTMLInputElement::put_value 赋值select:IHTMLSelectElement,IHTMLSelectElement::put_selectedIndex 选中某个indexradio:IHTMLInputElement,IHTMLInputElement::put_checked 进行选中form的提交:submit button,IHTMLElement::click()但有几项它是用脚本弄得不怎么清楚怎么弄。<tr> <td class="t"> <b class="red">*</b> 补充说明: </td> <td><div id="div_htmleditor"></div> <textarea id="Content" name="Content" style="width:0px; height:0px; display:none;"></textarea> <span id="Content_Tip"></span><div id="divContentValue" style="display:none;"></div> </td> </tr> <tr id="pdv"><td class="t"> </td> <td><div id="uploadPic" value=""></div> <script type="text/javascript">$.c.Uploader.init();</script></td></tr> tr> <td class="t"> <b class="red">*</b> 补充说明: </td> <td><div id="div_htmleditor"></div> <textarea id="Content" name="Content" style="width:0px; height:0px; display:none;"></textarea> <span id="Content_Tip"></span><div id="divContentValue" style="display:none;"></div> </td> </tr> <tr id="pdv"><td class="t"> </td> <td><div id="uploadPic" value=""></div> <script type="text/javascript">$.c.Uploader.init();</script></td></tr> 是Form表单里要填的内容之一:Content,uploadPic这2项用我5楼的IHTMLElement填写不了。应为它有脚步所以我不怎么清楚怎么弄。你们有什么方法没? http://post.58.com/79/8/s5 http://post.58.com/79/8/s5 http://beihai.lotour.com/lvxingshe/01074125/ http://beihai.lotour.com/lvxingshe/01074125/ Kinect、IplImage、MFC CRichEditCtrl如何实现将某些文字设成超链接? delphi VC 混合编程 图像显示 请问杀毒软件等软件向其它进程注入DLL的方法是什么? 为什么我在程序中调用的别的程序运行不下去,非要等调用它的程序退出后才能继续? 关于一个vc6.0中文本框焦点控制的问题?谢谢! 如何使clistctrl的第一列的字符居中? 关于数据如何存储的问题,请大侠帮忙! 各位VC高人,如何用VC编译小于24K的程序? 为什么我做的有背景的对话框上的控件总不能透明? 各位高手过来看一下这段代码,关于遍历bmp像素 [散分]散分,不为别的。。。
这个貌似不能后台操作的吧。我要可以后台操作的!
可以考虑用cwebbrowser做个简单的浏览器然后做页面解析
先用IHTMLDocument3::getElementById 得到 IHTMLElement
然后根据不同的类型,从IHTMLElement QueryInterface 不同接口input:
IHTMLInputElement,
IHTMLInputElement::put_value 赋值select:
IHTMLSelectElement,
IHTMLSelectElement::put_selectedIndex 选中某个indexradio:
IHTMLInputElement,
IHTMLInputElement::put_checked 进行选中form的提交:
submit button,
IHTMLElement::click()
但有几项它是用脚本弄得不怎么清楚怎么弄。
<tr> <td class="t"> <b class="red">*</b> 补充说明: </td> <td><div id="div_htmleditor"></div> <textarea id="Content" name="Content" style="width:0px; height:0px; display:none;"></textarea> <span id="Content_Tip"></span><div id="divContentValue" style="display:none;"></div> </td> </tr> <tr id="pdv"><td class="t"> </td> <td><div id="uploadPic" value=""></div> <script type="text/javascript">$.c.Uploader.init();</script></td></tr>
应为它有脚步所以我不怎么清楚怎么弄。你们有什么方法没?