呵呵,我上面那回复是完全从帮助里复制出来的
上面的代码是可以的
#RequireAdmin
#include <IE.au3>
$oIE = _IECreate ("http://mail.163.com")
$oForms = _IEFormGetCollection ($oIE)
MsgBox(0, "表单信息", "这个页面上共有" & @extended & "个表单")
For $Form In $oForms
MsgBox(0, "表单名称", $Form.name)
$oQuerys = _IEFormElementGetCollection ($Form)
For $Query In $oQuerys
MsgBox(0, "表单控件信息", "名称:"&$Query.name & " 类型:"&$Query.type)
Next
Next
$oForm = _IEFormGetObjByName ($oIE, "login163")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
$oQuery = _IEFormElementGetObjByName ($oForm, "selType")
_IEFormElementOptionSelect ($oQuery , 1, 1, "byIndex")
_IEFormElementCheckboxSelect ($oForm, 0, "", 0, "byIndex")
_IEFormElementCheckboxSelect ($oForm, 1, "", 0, "byIndex")
$oQuery = _IEFormElementGetObjByName ($oForm, "登录邮箱")
_IEAction($oQuery ,"click")
sleep(2000)
_IEAction ($oIE, "visible")
|