Returns a collection object variable representing all Form Elements within a given Form.
#include <IE.au3>
_IEFormElementGetCollection ( ByRef $o_object [, $i_index = -1] )
Parameters
$o_object | Object variable of an InternetExplorer.Application, Form object |
$i_index | 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: | Returns an object variable containing the Form Elements collection, @EXTENDED = form element count |
Failure: | Returns 0 and sets @ERROR |
@Error: | 0 ($_IEStatus_Success) = No 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 |
Remarks
None.
Related
None.
Example
; *******************************************************
; Example 1 - 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>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)