#include <IE.au3>
#include <array.au3>
;账号
$idInput="********"
;密码
$pwdInput="*******"
$oIE = _IECreate ('http://mail.163.com/')
$id=_IEGetObjById($oIE,"idInput")
_IEFormElementSetValue($id,$idInput)
$pwd=_IEGetObjById($oIE,"pwdInput")
_IEFormElementSetValue($pwd,$pwdInput)
$login= _IEGetObjById($oIE,"loginBtn")
_IEAction($login,"click")
_IELoadWait($oIE,2000)
Do
Sleep(300)
$Url=_IEPropertyGet($oIE,'locationurl')
Until StringInStr($Url,'sid=')
$sid=StringRegExp($Url,'sid=(.*?)#',3)
If Not @error Then
_IENavigate($oIE,'http://cwebmail.mail.163.com/js4/index.jsp?sid='&$sid[0]&'#module=mbox.ListModule_0|{"fid":1}')
_IELoadWait($oIE,2000)
$ListUl_3 = _IEBodyReadHTML($oIE)
$MailTitle=StringRegExp($ListUl_3,'fG>(.+?)<',3)
If Not @error Then
_ArrayDisplay($MailTitle)
Else
MsgBox(16,'提示','邮件标题匹配出错/或没有邮件!')
EndIf
Else
MsgBox(16,'提示','sid值匹配出错!')
EndIf
|