Function Reference


_IEFormElementGetCollection

Returns a collection object variable representing all Form Elements within a given Form

#include <IE.au3>
_IEFormElementGetCollection ( ByRef $oObject [, $iIndex = -1] )

Parameters

$oObject Object variable of an InternetExplorer.Application, Form object
$iIndex [optional] specifies whether to return a collection or indexed instance
    0 or positive integer returns an indexed instance
    -1 = (Default) returns a collection

Return Value

Success: an object variable containing the Form Elements collection, @extended = form element count.
Failure: 0 and sets the @error flag to non-zero.
@error: 3 ($_IEStatus_InvalidDataType) - Invalid Data Type
4 ($_IEStatus_InvalidObjectType) - Invalid Object Type
5 ($_IEStatus_InvalidValue) - Invalid Value
7 ($_IEStatus_NoMatch) - No Match
@extended: Contains invalid parameter number

Related

_IEFormElementGetObjByName, _IEFormElementGetValue, _IEFormElementSetValue, _IEFormSubmit

Example

; Get a reference to a specific form element by 0-based index.
; In this case, submit a query to the Google search engine

#include <IE.au3>

Local $oIE = _IECreate("http://www.google.com")
Local $oForm = _IEFormGetCollection($oIE, 0)
Local $oQuery = _IEFormElementGetCollection($oForm, 4)
_IEFormElementSetValue($oQuery, "AutoIt IE.au3")
_IEFormSubmit($oForm)