GUI界面里面打开两个不同网页
本人想通过在一个GUI界面里面打开两个监控页面,可以自动登录,但是自己尝试半天只能打开一个,同时打开两个总会覆盖掉第一个,请高手支招!账号密码是错的,请忽略,提供思路即可 {:face (303):}
第一个监控:http://wridc123.com
第二个监控:http://www.xjcdata.com#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, -200, @DesktopWidth,600)
$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)
While 1
Sleep(1000) ; Idle around
WEnd
Exit 等了两天没有人解答,还是自己研究出来了{:face (270):}#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
学习,谢谢楼主! 学习了,正在找这个资料。 thanks 4 sharing! 这个好以后用得上 收藏学习下 @DesktopWidth, 100)
修改为
@DesktopWidth, @Desktopheight/2) 学习学习.,
页:
[1]