#include <IE.au3>
#include <IEEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
$oIE = _IECreate("http://security.weibo.com/security/index")
$Form1 = GUICreate("输入账号密码", 258, 159, 183, 124)
WinSetOnTop("输入账号密码","",1)
$Input1 = GUICtrlCreateInput("hzxlwb001@126.com", 88, 16, 145, 21)
$Label1 = GUICtrlCreateLabel("微博账号:", 24, 16, 64, 17)
$Label2 = GUICtrlCreateLabel("微博密码:", 24, 48, 64, 17)
$Input2 = GUICtrlCreateInput("123asdzxc", 88, 48, 145, 21)
$Button1 = GUICtrlCreateButton("测试开始", 32, 120, 201, 33)
$Label3 = GUICtrlCreateLabel("请手动登陆微博,再点【测试开始】", 24, 88, 218, 17)
GUISetState(@SW_SHOW)
Do
Sleep(1)
Until GUIGetMsg() = $Button1
GUIDelete($Form1)
Do
_IENavigate($oIE,"http://security.weibo.com/security/index")
_IELoadWait($oIE)
Until StringInStr(_IEBodyReadText($oIE),"登录保护")
$Ele = _IEQuery($oIE,"LI",'OuterText="登录保护 "');单击登录保护
$Ele.click
Sleep(200)
$Ele = _IEGetObjById($oIE,"2");在以下地点不需要验证
$Ele.click
Sleep(200);新增地点
$Ele = _IEQuery($oIE,"SPAN",'OuterText="+新增地点"')
$Ele.click
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;下面这两行代码不起作用,不知道应该怎么改?
Sleep(200)
$Ele = _IEGetObjByName($oIE,"province0") ;身份
_IEFormElementOptionSelect($Ele,11,1,"byIndex") ;以浙江为例
Sleep(800)
$Ele = _IEGetObjByName($oIE,"city0") ;城市
_IEFormElementOptionSelect($Ele,1,1,"byIndex") ;以杭州为例
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;上面这两行代码不起作用,不知道应该怎么改?
$Ele = _IEQuery($oIE,"SPAN",'OuterText="保存 "');单击保存
$Ele.click
想了下,可能的思路是: