找回密码
 加入
搜索
查看: 1997|回复: 2

纯粹是为了看高亮而发的贴...

[复制链接]
发表于 2011-9-19 18:31:29 | 显示全部楼层 |阅读模式
Func _JwcConfirm($goIE)
        $confirms=$gsmainFrame.document.images
        For $confirm In $confirms
                If $confirm.title=="确定" Then
                        GUICtrlSetData("点击了一个"&@CRLF,1)
                        ;$j+=1
                        ;Sleep(2*61*1000)
                        $confirm.click
                        Sleep(1000)
                        If ControlClick("[CLASS:#32770]", "", "[ID:2]")<>0 Then
                                GUICtrlSetData("没有弹窗"&@CRLF,1)
                        Else
                                GUICtrlSetData("有弹窗"&@CRLF,1)
                        EndIf
                        ;While 1
                        ;        Sleep(300)
                        ;        If WinExists("[CLASS:#32770]","OK") Then
                        ;                ControlSend("[CLASS:#32770]", "OK", "", "{enter}")
                                ;EndIf
                        ;WEnd
                        ExitLoop
                EndIf
        Next
EndFunc



Func _JwcSelect($goIE)
        $cir=1
        $c=0
        $topFrame=_IEFrameGetObjByName($goIE,"topFrame")
        ;$topFrame.document.anchors[0].click
        _IELinkClickByTitle($topFrame,"title","选课管理")
        $bottomFrame=_IEFrameGetObjByName($goIE,"bottomFrame")
        $menuFrame=_IEFrameGetObjByName($bottomFrame,"menuFrame")
        _IELinkClickByTitle($menuFrame,"id","individual",1)
        $mainFrame=_IEFrameGetObjByName($bottomFrame,"mainFrame")
        $gsMainFrame=$mainFrame
        $courseNum=GUICtrlRead($input5)
        While 1
                ;_IELinkClickByTitle($mainFrame,"name","pagelink",2)
                $oCourses=_IEFrameGetObjByName($gsMainFrame,"inforUpContent")
                $goCourses=$oCourses
                If $oCourses==0 Then
                        GUICtrlSetData($Edit1,"框架获取失败,重试。。。"& @CRLF,1)
                        $cir=1
                        Sleep(500)
                        ContinueLoop
                EndIf
                ;MsgBox(0,"1","Are you watching closely?",1)
                ;Sleep(200)
                _IELoadWait($goCourses)
                $oSelected=_IEGetObjById($goCourses,"kch")
                If $oSelected==0 Then
                        GUICtrlSetData($Edit1,"课程号框获取失败,重试。。。"& @CRLF,1)
                        Sleep(100)
                        ContinueLoop
                EndIf
                ;MsgBox(0,"2","Are you watching closely?",1)
                ;Sleep(200)
                If _IEDocInsertText($oSelected,$courseNum)==0 Then
                        GUICtrlSetData($Edit1,"课程号输入,重试。。。"& @CRLF,1)
                        Sleep(100)
                        ContinueLoop
                EndIf
                ;MsgBox(0,"3","Are you watching closely?",1)
                ;Sleep(500)
                $searchs=$goCourses.document.images
                If $searchs==0 Then
                        GUICtrlSetData($Edit1,"过滤按钮获取失败,重试。。。"& @CRLF,1)
                        Sleep(100)
                        ContinueLoop
                EndIf
                ;MsgBox(0,"4","Are you watching closely?",1)
                ;Sleep(500)
                For $search In $searchs
                        If $search.title=="过滤" Then
                                $search.click
                                ExitLoop
                        EndIf
                Next
                ;MsgBox(0,"5","Are you watching closely?",1)
                ;Sleep(500)
                _IELoadWait($oCourses)
                $oForm=_IETagNameGetCollection ($oCourses,"form",1)
                If $oForm==0 Then
                        GUICtrlSetData($Edit1,"表单取失败,重试。。。"& @CRLF,1)
                        Sleep(100)
                        ContinueLoop
                EndIf
                ;MsgBox(0,"form数量",@extended)
                
                If _IEFormElementCheckboxSelect($oForm,0,"",1,"byIndex")<>0 Then
                        _JwcConfirm($goIE)
                        GUICtrlSetData($Edit1,"<DONE>"& @CRLF,1)
                        ExitLoop
                Else
                        $c+=1
                        GUICtrlSetData($Edit1,"<"&$c&">",1)
                EndIf
                ;$cir=_IELinkClickByTitle($gsMainFrame,"name","pagelink",1)
                ;If $cir=0 Then
                ;        GUICtrlSetData($Edit1,"选课时间结束..."& @CRLF,1)
                ;EndIf
                _IELinkClickByTitle($menuFrame,"id","individual",1)
                $mainFrame=_IEFrameGetObjByName($bottomFrame,"mainFrame")
                $gsMainFrame=$mainFrame
                _IELoadWait($goIE)
                Sleep(500)
        WEnd
EndFunc
发表于 2011-9-19 19:14:07 | 显示全部楼层
高亮有啥好的,不好复制局部的字符
发表于 2011-10-1 00:52:31 | 显示全部楼层
回复 2# afan
楼上太强大了~这个都发现了~能解释一下为什么么!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-19 05:20 , Processed in 0.075313 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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