因为搜狐邮箱的普通用户是用JS生成的HTML,它的登陆不是图片,而是一个input来的,没怎么用过IE方面的函数,瞎搞了很久,最终在Gooker的帮助下,得以完善脚本。
#include <IE.au3>
$oIE = _IECreate ("http://mail.sohu.com")
$oForm = _IEFormGetObjByName ($oIE, "loginform")
$oQuery = _IEFormElementGetObjByName ($oForm, "email")
_IEFormElementSetValue ($oQuery, "user")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "password")
$oInputs = _IETagNameGetCollection ($oIE, "input")
For $oInput In $oInputs
If $oInput.value = "登 录" Then _IEAction($oInput,"click")
Next
|