找回密码
 加入
搜索
查看: 2285|回复: 0

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

[复制链接]
发表于 2012-11-23 12:13:19 | 显示全部楼层 |阅读模式
本帖最后由 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

今天解决了个关闭弹窗的,麻烦各位再帮我解决一下这个吧!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-16 10:38 , Processed in 0.077989 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表