IE选择列表不知为何无限循环焦点!
本帖最后由 xxsshh 于 2012-2-3 21:02 编辑我用的是模拟用户点击,年月日全选好后!焦点就在年月日之间不停循环!以致无法完成任务!!请教大虾解惑!!!
#include <IE.au3>
$ck = WinExists("QQ注册")
If $ck = 0 Then
$oIE1 = _IECreate ("http://zc.qq.com/chs/index.html?from=client&ptlang=2052&ADUIN=0&ADSESSION=0&ADTAG=CLIENT.QQ.4153_NewAccount_Btn.0")
EndIf
$oIE = _IEAttach("http://zc.qq.com/chs/index.html?from=client&ptlang=2052&ADUIN=0&ADSESSION=0&ADTAG=CLIENT.QQ.4153_NewAccount_Btn.0","url")
$username = _IEGetObjById($oIE,"nick")
_IEFormElementSetValue($username,"xshaitt11111")
_IEAction ($username, "blur")
$password = _IEGetObjById($oIE,"password")
_IEAction ($password, "focus")
_IEFormElementSetValue($password,"x123456")
_IEAction ($password, "blur")
$okpassword = _IEGetObjById($oIE,"password_again")
_IEAction ($okpassword, "focus")
_IEFormElementSetValue($okpassword,"x123456")
_IEAction ($okpassword, "blur")
$Gender = _IEGetObjById($oIE,"sex_1")
_IEAction ($Gender, "click")
$yearvalue = _IEGetObjById($oIE,"year_17")
_IEAction ($yearvalue, "click")
$month = _IEGetObjById($oIE,"month_5")
_IEAction ($month, "click")
$day = _IEGetObjById($oIE,"day_7")
_IEAction ($day, "click") 顶住!!不让它沉了!!! 相同困惑,望高人指点 沒記錯的話IE.UDF 應該也可以設定焦點的.....把焦點射到其他的位置呀 回复 4# kk_lee69
你好!!!我在点击年后,把焦点以经不知道给了多少个对象了! 回复 3# zldfsz
同病相怜啊!!{:face (356):} 顶住!!不让它沉了!!! 顶住!!不让它沉了!!! 我也是在想这个问题啊 连个网址都没有,神仙才能帮你
而且为什么要用模拟点击?直接赋值不行? 回复 10# 骗子
代码贴上去了!帮帮我吧! 顶住!!不让它沉了!!! 直接赋值应该可以吧。。。 直接赋值应该可以吧。。。 试一下这段代码:$oIE = _IECreate("http://zc.qq.com/chs/index.html?from=client&ptlang=2052&ADUIN=0&ADSESSION=0&ADTAG=CLIENT.QQ.4153_NewAccount_Btn.0")
_IELoadWait($oIE)
If WinExists("QQ注册") Then
$user = _IEGetObjByName($oIE, "nick");用户名
$user.value = "xshaitt11111"
$PW = _IEGetObjByName($oIE, "password");密码
$PW.value = "x123456"
$PW1 = _IEGetObjByName($oIE, "pass_again");密码
$PW1.value = "x123456"
$Gender = _IEGetObjByName($oIE, "male")
$Gender.click
$yearvalue = _IEGetObjById($oIE, "year_value")
$yearvalue.click
$month = _IEGetObjById($oIE,"month_value")
$month.click
$day = _IEGetObjById($oIE,"day_value")
$day.click
Else
$text = "出错了,程序将退出。"
ToolTip($text, @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 100, "错误提示")
Sleep(5000)
Exit
EndIf
页:
[1]