找回密码
 加入
搜索
查看: 2374|回复: 5

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

[复制链接]
发表于 2009-8-13 17:45:58 | 显示全部楼层 |阅读模式
例如http://www.autoitx.com/post.php?action=newthread&fid=4
需要用到的表单源码为:
<form method="post" id="postform"
action="post.php?&action=newthread&fid=4&extra=&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如何通过读取源码读取取来进行选择?

评分

参与人数 1金钱 +10 收起 理由
bd540 + 10

查看全部评分

 楼主| 发表于 2009-8-13 19:59:50 | 显示全部楼层
没有人来指点一下吗?
 楼主| 发表于 2009-8-14 01:57:16 | 显示全部楼层
跑第二页去了,顶起来啊。
 楼主| 发表于 2009-8-15 12:37:28 | 显示全部楼层
人肉置顶
发表于 2009-8-15 14:36:36 | 显示全部楼层
楼主动机不纯啊
盯上acn想做发帖机发广告贴?
发表于 2009-8-15 14:39:15 | 显示全部楼层
很有可能!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-22 23:37 , Processed in 0.075405 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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