|
本帖最后由 cqgxp 于 2012-11-6 13:47 编辑
我在ie操作中,提交表单后,出现一个新页面,我想新页面也在原来的窗体上,怎么办?代码如下,请大师看看
#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate(" ", 634, 465, -1, -1)
_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
$GUIActiveX = GUICtrlCreateObj($oIE, -1, -1, 625, 440);嵌入式ie控件位于隐藏窗体上
GUISetState(@SW_SHOW)
_IENavigate($oIE, "http://www.2345.com")
$oForm = _IEFormGetObjByName($oIE, "bdfm");表单名
Local $oQuery = _IEFormElementGetObjByName($oForm, "word");表单中的元素名称
_IEFormElementSetValue($oQuery, "乒乓球");设置指定表单元素的值
_IEFormSubmit($oForm,0)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
GUIDelete()
Exit |
|