等好几天都没人回答,还是自己贴上答案吧#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$mainwindow = GUICreate("时代天元监控服务器", @DesktopWidth, @DesktopHeight)
GUISetState(@SW_SHOW);窗口可见
$oIE = _IECreateEmbedded()
$GUIX = GUICtrlCreateObj($oIE, 0, 0, @DesktopWidth, 400)
$uu = _IENavigate($oIE, "http://wridc123.com")
$oForm = _IEFormGetObjByName($oIE, "login")
$oQuery1 = _IEFormElementGetObjByName($oForm, "login_username")
_IEFormElementSetValue($oQuery1, "admin")
$oQuery2 = _IEFormElementGetObjByName($oForm, "login_password")
_IEFormElementSetValue($oQuery2, "123456")
_IEFormSubmit($oForm, 1)
$cactiez = _IECreateEmbedded()
$cactiezobj = GUICtrlCreateObj($cactiez, 0, 500, @DesktopWidth, 100)
_IENavigate($cactiez, "http://www.xjcdata.com", 1)
$cactiezform = _IEFormGetObjByName($cactiez, "login")
$form1 = _IEFormElementGetObjByName($cactiezform, "login_username")
_IEFormElementSetValue($form1, "admin")
$form2 = _IEFormElementGetObjByName($cactiezform, "login_password")
_IEFormElementSetValue($form2, "12345678")
_IEFormSubmit($cactiezform, 1)
While 1
Sleep(1000) ; Idle around
WEnd
Exit
|