找回密码
 加入
搜索
查看: 3449|回复: 3

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

[复制链接]
发表于 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 编辑 ]
发表于 2008-9-4 22:16:10 | 显示全部楼层
差不多的吧。没用搜狐的账号。你发个账号过来试下。
发表于 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

评分

参与人数 1金钱 +10 贡献 +5 收起 理由
lxz + 10 + 5

查看全部评分

 楼主| 发表于 2008-9-5 06:41:36 | 显示全部楼层
三恨居士的精神,确实值得大家好好学习,我除了给你加分,无以用什么来表达我的感激之情.
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-12 01:07 , Processed in 0.075046 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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