找回密码
 加入
搜索
查看: 2845|回复: 2

[AU3基础] 115网盘自动登陆

[复制链接]
发表于 2012-10-23 22:50:37 | 显示全部楼层 |阅读模式
麻烦各位高手帮我看看为何输入用户名和密码后无法自动点击“登录”和旁边的“保持登录状态”呢?请帮忙给个代码指点下。谢谢
#include <IE.au3>
$oIE = _IECreate("https://passport.115.com/?ct=login")
$oForm = _IEFormGetObjByName($oIE, 0)
$oQuery = _IEFormElementGetObjByName($oForm, "username")
_IEFormElementSetValue($oQuery, "88888888")
$oQuery = _IEFormElementGetObjByName($oForm, "passwd")
_IEFormElementSetValue($oQuery, "88888888")
$oQuery = _IEFormElementGetObjByName($oForm, "selType")
$oQuery = _IEFormElementGetObjByName($oForm, "submit")
_IEAction($oQuery, "click")
发表于 2012-10-24 16:05:04 | 显示全部楼层
$oQuery = _IETagNameGetCollection ($oIE, "span")
For $oQuery1 In $oQuery
       
if $oQuery1.innertext = "保持登录状态" then
       _IEAction ($oQuery1, "click")
EndIf
Next
$oQuery = _IETagNameGetCollection ($oIE, "button")

For $oQuery1 In $oQuery
       
if $oQuery1.innertext = "登录" then
       _IEAction ($oQuery1, "click")
EndIf
Next
试试这个,我是昨天才开始研究autoit的。
发表于 2012-10-25 09:26:13 | 显示全部楼层
二楼的方法好,最好使用For....IN.....语句的这种的好,我写过一个包含填写输入框,点击按钮,点击复选框的程序,但是源码在家里呢。如果需要请回复我,我发给你。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-20 07:21 , Processed in 0.074008 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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