1、登陆微博
2、输入用户名及密码
3、提交
4、写入微博信息
5、提交------未成功(对网页程序不了解,有空的人可以帮忙看看)
#include <IE.au3>
#AutoIt3Wrapper_run_debug_mode=Y
$oIE = _IECreate ("http://weibo.com/",0,1,1,1)
$StrUsr="leeboy_wang@163.com"
$StrPwd="1989725"
;========输入用户名及密码==================
;<input type="text" value="" action-data="text=邮箱/会员帐号/手机号" action-type="text_copy" class="W_input" name="username" node-type="username" tabindex="1" maxlength="128" autocomplete="off">
;通过标志名称找输入框,<input
$oInputs = _IETagNameGetCollection ($oIE, "input")
for $element in $oInputs
if $element.name="username" then
$element.Value=$StrUsr
ElseIf $element.name="password" And $element.value="" Then
$element.Value=$StrPwd
EndIf
next
Sleep(1000)
;========提交自动登陆 ==================
; <div><a href="javascript:void(0)" class="W_btn_g" action-type="btn_submit" node-type="submitBtn" suda-data="key=tblog_weibologin3&value=click_sign" tabindex="6"><span node-type="submitStates">登录</span></a></div>
;_IEAction ($oForm, "click") ;点按钮开始
$oInputs = _IETagNameGetCollection ($oIE, "a")
for $element in $oInputs
if $element.tabindex="6" then
_IEAction ($element, "click")
EndIf
next
;========输入微博内容 ==================
;网页上的用户的链接 : <div class="bottom_border"><textarea tabindex="1" title="微博输入框" name="" node-type="textEl" style="height: 55px;"></textarea>
$oInputs = _IETagNameGetCollection ($oIE, "textarea")
for $element in $oInputs
if $element.title= $element.title then
$element.Value="哥写了个程序刷微博"
MsgBox(0,"First","Messag 11")
EndIf
next
Sleep(1000)
;=============提交微博========未成功============
;$oInputs = _IETagNameGetCollection ($oIE, "a")
;for $element in $oInputs
;if $element.class="btn_30px" then
; _IEAction ($element, "click")
;MsgBox(0,"Second","Pusblih But!")
;EndIf
;next