找回密码
 加入
搜索
查看: 5568|回复: 14

[IE类操作] IE选择列表不知为何无限循环焦点!

  [复制链接]
发表于 2012-2-2 12:59:42 | 显示全部楼层 |阅读模式
本帖最后由 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")

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2012-2-2 13:16:59 | 显示全部楼层
顶住!!不让它沉了!!!
发表于 2012-2-2 13:52:50 | 显示全部楼层
相同困惑,望高人指点
发表于 2012-2-2 13:58:36 | 显示全部楼层
沒記錯的話  IE.UDF 應該也可以設定焦點的.....把焦點射到其他的位置呀
 楼主| 发表于 2012-2-2 14:05:12 | 显示全部楼层
回复 4# kk_lee69
你好!!!我在点击年后,把焦点以经不知道给了多少个对象了!
 楼主| 发表于 2012-2-2 14:05:51 | 显示全部楼层
回复 3# zldfsz
同病相怜啊!!
 楼主| 发表于 2012-2-2 15:21:09 | 显示全部楼层
顶住!!不让它沉了!!!
 楼主| 发表于 2012-2-2 22:51:08 | 显示全部楼层
顶住!!不让它沉了!!!
发表于 2012-2-3 09:36:22 | 显示全部楼层
我也是在想这个问题啊
发表于 2012-2-3 10:06:06 | 显示全部楼层
连个网址都没有,神仙才能帮你
而且为什么要用模拟点击?直接赋值不行?
 楼主| 发表于 2012-2-3 21:03:08 | 显示全部楼层
回复 10# 骗子
代码贴上去了!帮帮我吧!
 楼主| 发表于 2012-2-4 12:57:17 | 显示全部楼层
顶住!!不让它沉了!!!
发表于 2012-2-18 16:20:00 | 显示全部楼层
直接赋值应该可以吧。。。
发表于 2012-2-18 16:20:04 | 显示全部楼层
直接赋值应该可以吧。。。
发表于 2012-2-18 20:10:21 | 显示全部楼层
试一下这段代码:
$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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-2 08:23 , Processed in 0.087205 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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