chamlien 发表于 2012-11-23 12:13:19

【无意义】在GUI里嵌入IE自动填单应怎样处理呢?

本帖最后由 chamlien 于 2014-8-19 20:39 编辑

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
$form = GUICreate("欢迎使用流量查询专用工具",750, 400)
$oIE = ObjCreate("Shell.Explorer.1")
GUICtrlCreateObj($oIE, -1, -25, 750, 400)
$oIE.document.body.scroll = "no"
$oIE.Navigate("https://218.19.163.114")
Run(@AutoItExe & ' /AutoIt3ExecuteLine"Dim $s=''安全警报'',$a=WinWait($s), $a=WinActivate($s), $a=ControlClick($s, '''', ''Button1''), $a=WinClose($s), $a=WinWait($s), $a=WinActivate($s), $a=ControlClick($s, '''', ''Button1'')"')
;开始填单
Local $oForm = _IEFormGetObjByName($oIE, "login_form")
Local $oQuery = _IEFormElementGetObjByName($oForm, "uname")
_IEFormElementSetValue($oQuery, "test")
Local $oQuery = _IEFormElementGetObjByName($oForm, "pwd")
_IEFormElementSetValue($oQuery, "abctest")
_IEFormSubmit($oForm)

GUISetState(@SW_SHOW)

While 1   
   If GUIGetMsg() = -3 Then
          Exit
        EndIf
WEnd


错误提示:
Variable must be of type "Object".:
Local $o_col = $o_object.document.forms.item($s_Name)
Local $o_col = $o_object.document^ ERROR

今天解决了个关闭弹窗的,麻烦各位再帮我解决一下这个吧!
页: [1]
查看完整版本: 【无意义】在GUI里嵌入IE自动填单应怎样处理呢?