115网盘自动登陆
麻烦各位高手帮我看看为何输入用户名和密码后无法自动点击“登录”和旁边的“保持登录状态”呢?请帮忙给个代码指点下。谢谢#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") $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的。 二楼的方法好,最好使用For....IN.....语句的这种的好,我写过一个包含填写输入框,点击按钮,点击复选框的程序,但是源码在家里呢。如果需要请回复我,我发给你。
页:
[1]