likeask 发表于 2009-8-13 17:45:58

请问论坛发帖页面表单提交和typeid值的获取方法

例如http://www.autoitx.com/post.php?action=newthread&fid=4
需要用到的表单源码为:<form method="post" id="postform"
action="post.php?&amp;action=newthread&amp;fid=4&amp;extra=&amp;topicsubmit=yes"
enctype="multipart/form-data" onsubmit="return validate(this)">
<span><input name="subject" id="subject" class="txt" value="" tabindex="1" /></span>
<select name="typeid" id="typeid">
<option value="0">分类</option><option value="1">提问</option><option value="3">已解决</option></select>
<textarea class="autosave max" name="message" id="e_textarea" tabindex="1" class="txt" style="height:300px"></textarea>
<button type="submit" id="postsubmit" value="true" name="topicsubmit" tabindex="1">
发新话题
</button>
</form>我这样写提交不成功,请高手指教:#include <IE.au3>
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("New Post", 700, 453)
$oIE = _IECreateEmbedded()
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 700, 453)
GUISetState(@SW_SHOW)


_IENavigate($oIE, "http://www.autoitx.com/post.php?action=newthread&fid=4")
_IELoadWait($oIE)
$oForm = _IEGetObjById($oIE, "postform")
$oQuery = _IEFormElementGetObjByName($oForm, "typeid")
$oQuery.value = "1"
$oQuery = _IEFormElementGetObjByName($oForm, "subject")
_IEFormElementSetValue($oQuery, "帖子标题")
$oQuery = _IEFormElementGetObjByName($oForm, "message")
_IEFormElementSetValue($oQuery, "帖子内容………………")
$oQuery = _IEFormElementGetObjByName($oForm, "topicsubmit")
_IEAction($oQuery, "click")

While 1
        $msg = GUIGetMsg()
        Select
                Case $msg = $GUI_EVENT_CLOSE
                        Exit
        EndSelect
WEnd
另外,typeid的value如何通过读取源码读取取来进行选择?

likeask 发表于 2009-8-13 19:59:50

没有人来指点一下吗?

likeask 发表于 2009-8-14 01:57:16

跑第二页去了,顶起来啊。

likeask 发表于 2009-8-15 12:37:28

人肉置顶:face (13):

lynfr8 发表于 2009-8-15 14:36:36

楼主动机不纯啊
盯上acn想做发帖机发广告贴?

kn007 发表于 2009-8-15 14:39:15

很有可能!
页: [1]
查看完整版本: 请问论坛发帖页面表单提交和typeid值的获取方法