#include <IE.au3>
$oIE = _IECreate ("http://38.19.7.69:9082/nbWeb",0,1,0,0)
Sleep(1000)
$oForm = _IEFormGetObjByName ($oIE, "commitForm")
$oQuery = _IEFormElementGetObjByName ($oForm, "oper_user_id")
_IEFormElementSetValue ($oQuery, "99999-99")
$oQuery = _IEFormElementGetObjByName ($oForm, "oper_pwd")
_IEFormElementSetValue ($oQuery, "888888")
_IEFormSubmit ($oForm, 0)
Sleep(1000)
_WinAdlib('Microsoft Internet Explorer', '', 'MyAdlib')
$oIE = _IECreate("http://38.19.7.69:9082/nbWeb/management/duizhang/duizhang.jsp?func_id=1110321",0,1,0,0)
;AdlibRegister("MyAdlib")
Sleep(1000)
;系统日切
$oForm = _IEFormGetObjByName ($oIE, "iForm")
$ID =_IEGetObjById ($oForm, "bt_on")
_IEAction($ID,"click")
Func MyAdlib()
Send("{enter}")
EndFunc
; 函数名:_WinAdlib;=======================================================================
; 说明: 在弹窗出现时执行某个函数
; 语法: _WinAdlib('窗口标题', '窗口文本', '函数名'[, '超时'])
; 返回值:无
;====================================================================================start
Func _WinAdlib($title, $text, $Func, $timeout = 3000)
Global $__title = $title, $__text = $text, $__Func = $Func, $__timeouts, $__timeout = $timeout
Global $__Timer = DllCallbackRegister('__Timer', 'int', 'hwnd;uint;uint;dword')
Global $__TimerDLL = DllCall('user32.dll', 'uint', 'SetTimer', 'hwnd', 0, 'uint', _
0, 'int', 100, 'ptr', DllCallbackGetPtr($__Timer))
EndFunc ;==>_WinAdlib
Func __Timer($hwnd, $uiMsg, $idEvent, $dwTime)
If $idEvent = $__TimerDLL[0] Then
;WinActive();WinExists
If WinActive($__title, $__text) Then
DllCallbackFree($__Timer)
Call($__Func)
Else
$__timeouts += 100
If $__timeouts >= $__timeout Then
DllCallbackFree($__Timer)
EndIf
EndIf
EndIf
EndFunc ;==>__Timer