_IEFormElementGetObjByName
Returns an object reference to a Form Element by name.
#include <IE.au3>
_IEFormElementGetObjByName(ByRef $o_object, $s_name [, $i_index = 0])
Параметры
| $o_object | Переменная объекта InternetExplorer.Application, Form object |
| $s_name |
Specifies the name of the Form Element you wish to match |
| $i_index |
[необязательный] If the Form Element name occurs more than once, specifies instance by 0-based index 0 - (по умолчанию) or positive integer returns an indexed instance -1 - returns a collection of the specified Form Elements |
Возвращаемое значение
| Успех: | Возвращает an object variable pointing to the Form Element object, @extended = form count |
| Ошибка: | Возвращает 0 и устанавливает @error |
| @error: | 0 ($_IEStatus_Success) = Нет ошибок |
| 3 ($_IEStatus_InvalidDataType) = Неверный тип данных | |
| 4 ($_IEStatus_InvalidObjectType) = Неверный тип объекта | |
| 7 ($_IEStatus_NoMatch) = Нет совпадений | |
| @extended: | Содержит номер неверного параметра |
Примечания
If the desired form element does not have a name or ID, _IEFormElementGetCollection to get a reference by indexСм. также
_IEFormElementGetCollection, _IEFormElementGetValue, _IEFormElementSetValue, _IEFormSubmitПример

; *******************************************************
; Пример 1 - Get a reference to a specific form element by name.
; In this case, submit a query to the Google search engine
; *******************************************************
#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)