autoit 三次尝试 自动登陆新浪微博

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

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值