纯粹是为了看高亮而发的贴...
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("", "", "")<>0 Then
GUICtrlSetData("没有弹窗"&@CRLF,1)
Else
GUICtrlSetData("有弹窗"&@CRLF,1)
EndIf
;While 1
; Sleep(300)
; If WinExists("","OK") Then
; ControlSend("", "OK", "", "{enter}")
;EndIf
;WEnd
ExitLoop
EndIf
Next
EndFunc
Func _JwcSelect($goIE)
$cir=1
$c=0
$topFrame=_IEFrameGetObjByName($goIE,"topFrame")
;$topFrame.document.anchors.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
高亮有啥好的,不好复制局部的字符 回复 2# afan
楼上太强大了~这个都发现了~能解释一下为什么么!
页:
[1]