iorizzm 发表于 2009-10-25 23:04:20

和讯博客自动发表问题

高手帮忙看看 为什么Textarea区域发送不了文本!!#include<IE.au3>
$oIE = _IECreate('http://reg.hexun.com/login.aspx?TextBoxUserName=zsq20080505&TextBoxPassword=123456&LoginStateName=1&submitsign=1&hiddenReferrer=http%253a%252f%252fpost.blog.hexun.com%252fi%252farticleedit.aspx%253fBlogName%253d13020416&TextGpic=&gourl=http%3A%2F%2Fpost.blog.hexun.com%2Fi%2Farticleedit.aspx%3FBlogName%3D13020416')
$oForm = _IEFormGetObjByName ($oIE, "submitform")

$title = _IEFormElementGetObjByName ($oForm, "TitleTextbox")
_IEFormElementSetValue ($title,"测试标题!!!!!!!!!!!!!")

$oQuery1 = _IEFormElementGetObjByName ($oForm, "Neweditarticle2008_1:CategoryList")
_IEFormElementOptionSelect ($oQuery1,"新闻类",1,"bytext")

$oQuery = _IEFormElementGetObjByName($oForm, "ContentSpaw")
_IEFormElementSetValue($oQuery, "AutoIt IE.au3")

$tag= _IEGetObjByName ($oIE, "TagTextbox")
$tag.value = "tmp1,tmp2"

$oInputs = _IETagNameGetCollection ($oIE, "INPUT")
For $oInput In $oInputs
If $oInput.type = "button" Then
_IEAction($oInput,"click")
EndIf
Next

iorizzm 发表于 2009-10-26 09:11:28

顶一下顶一下

jhwl 发表于 2009-10-26 12:54:45

原文中使用Editor.setContent 方法来设置ContentSpaw的值
此方法包涵在一个JS里面所以最好采用_IEBodyWriteHTML,或者使用post
页: [1]
查看完整版本: 和讯博客自动发表问题