找回密码
 加入
搜索
查看: 3650|回复: 7

[AU3基础] [已解决]请教:使用IEFormElementSetValue输入内容为何无效

[复制链接]
发表于 2010-4-18 22:30:22 | 显示全部楼层 |阅读模式
本帖最后由 acbs 于 2010-4-20 09:30 编辑

</div>
<div class="postlary2" style="height:28px;line-height:28px;border-top:0px; ">
<div class="postuserinfo" style="height:28px;text-indent:10px;">
<b>签名</b><input type="radio" value="0" name="signflag" />不显示<input type="radio" checked="checked" value="1" name="signflag" />显示
                </div>
<div class="postie" style="height:28px;padding:0px;text-indent:10px;text-align:left; "><div>
<input type="hidden" value="" name="jkPostCheck" id="jkPostCheck" />
<input type="hidden" value="" id="jkPostCheck2code" />
<input type="hidden" value="" name="jkPostCheck2" id="jkPostCheck2" />
<input type="Submit" value="OK!发表回复" name="Submit" style="margin:3px;" onclick="document.getElementById('jkPostCheck').value=jPostCheck;document.getElementById('jkPostCheck2').value=document.getElementById('jkPostCheck2code').value;" />
<input type="button" value="预 览" name="Button" style="margin:3px;" onclick="Gopreview()" />
<input style="margin:3px;" type="reset" name="Clear" value="清空内容!" onclick="ClearReset()" />
内容限制:<input class="Dvbbs_Reply" disabled="disabled" maxLength="6" size="8" value="116240" name="total" /> 字节.
</div></div>
</div>
</form>
<form name="preview" action="preview.asp?boardid=99" method="post" target="preview_page" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:masterJs="Kissogram">
<input type="hidden" name="Dvtitle" value="" /><input type="hidden" name="theBody" value="" /></form>
<script language="Javascript" type="text/javascript">
var Dvbbs_bIsIE5=document.all;
var Dvbbs_Mode = 3;
if (Dvbbs_bIsIE5)
{var IframeID=frames["Dvbbs_Composition"];}
else
{
var IframeID=document.getElementById("Dvbbs_Composition").contentWindow;
}
function Gopreview()
{
document.preview.theBody.value=IframeID.document.body.innerHTML;
var popupWin = window.open('', 'preview_page', 'scrollbars=yes,width=750,height=450');
document.preview.submit()
}
Dvbbs_InitDocument('Body','gb2312');
</script>

上面是网页源码,我想在指定的地方输入内容,用下面的代码为啥不行呢?请大侠指点一下。
$oForm = _IEFormGetObjByName ($oIE, "thebody")
$oText = _IEFormElementGetObjByName ($oForm, "hidden")
_IEFormElementSetValue ($oText, "66666666666")
 楼主| 发表于 2010-4-19 06:26:45 | 显示全部楼层
请大家帮忙看一下,谢谢。
 楼主| 发表于 2010-4-20 09:30:28 | 显示全部楼层
在8兄的帮助下,已解决.
发表于 2010-4-20 13:23:31 | 显示全部楼层
最好贴上解决主题的办法,不然此主题将无意义~
发表于 2010-7-28 15:00:07 | 显示全部楼层
回复 4# afan

我来贴当时帮他解决的代码吧
关键思路是分析源代码可知:回帖框的真正对象不是form而是frame
应该对Dìscüz这一类的论坛的回帖框都有效
担心被利用做灌水发帖机
希望大家应用到正途!
#include <IE.au3>
$oIE = _IECreate("http://www.excelpx.com/dispbbs.asp?boardID=99&ID=124769&page=1")
_IELoadWait($oIE)
$oFrame = _IEFrameGetObjByName ($oIE, "Dvbbs_Composition")
_IEBodyWriteHTML ($oFrame, "龙腾鱼香,金币滚滚来~")
_IELoadWait ($oFrame)
$form = _IEformGetObjByName ($oIE, "Dvform")
$Submit = _IEFormElementGetObjByName ($Form, "Submit")
;_IEFormElementSetValue ($Submit, "准备回复咯")
_IEAction ($Submit, "click")

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-7-28 15:04:40 | 显示全部楼层
再看楼主在那个论坛的帖子都灌水灌到700多楼
灌水机确实是两面刀啊!
发表于 2010-7-28 15:32:43 | 显示全部楼层
效率太低了,一分钟才1-2次
发表于 2010-8-3 11:29:47 | 显示全部楼层
很强大

登陆窗口也可以操作了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-3 12:33 , Processed in 0.087162 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表