lxz 发表于 2008-9-4 14:51:37

搜狐邮箱自动登陆(已解决)

哪位朋友能否把下面的163邮箱自动登陆改成搜狐邮箱自动登陆,谢了.


#include <IE.au3>
$oIE = _IECreate ("http://mail.163.com")
$oForm = _IEFormGetObjByName ($oIE, "login163")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "用户名")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "密码")
$oQuery = _IEFormElementGetObjByName ($oForm, "selType")
_IEFormElementOptionSelect ($oQuery , 1, 1, "byIndex")
_IEFormElementCheckboxSelect ($oForm, 0, "", 0, "byIndex")
_IEFormElementCheckboxSelect ($oForm, 1, "", 0, "byIndex")
$oQuery = _IEFormElementGetObjByName ($oForm, "登录邮箱")
_IEAction($oQuery ,"click")
sleep(2000)
_IEAction ($oIE, "visible")

[ 本帖最后由 lxz 于 2008-9-5 06:42 编辑 ]

sanhen 发表于 2008-9-4 22:16:10

差不多的吧。没用搜狐的账号。你发个账号过来试下。

sanhen 发表于 2008-9-5 00:12:04

因为搜狐邮箱的普通用户是用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

lxz 发表于 2008-9-5 06:41:36

三恨居士的精神,确实值得大家好好学习,我除了给你加分,无以用什么来表达我的感激之情.
页: [1]
查看完整版本: 搜狐邮箱自动登陆(已解决)