Retourne une variable objet collection repr�sentant les formulaires du document ou un formulaire unique donn� par son index
#include <IE.au3>
_IEFormGetCollection ( ByRef $oObject [, $iIndex = -1] )
$oObject | Variable objet InternetExplorer.Application, Window, Frame ou objet iFrame |
$iIndex | [optionnel] Sp�cifie s'il faut retourner une collection ou une instance index�e 0 ou un entier positif retourne une instance index�e -1 = (Par d�faut) retourne une collection |
Succ�s: | Retourne une variable objet avec une collection de tous les formulaire du document, @extended = nombre de formulaires. |
�chec: | D�finit @error <> 0. |
@error: | 3 ($_IEStatus_InvalidDataType) - Type de donn�e invalide 5 ($_IEStatus_InvalidValue) - Valeur invalide 7 ($_IEStatus_NoMatch) - Pas de correspondance trouv�e |
@extended: | Contient le nombre de param�tres invalides |
_IEFormGetObjByName, _IEFormReset, _IEFormSubmit
; Obtient une r�f�rence sur un formulaire sp�cifique par index de base 0, ; dans ce cas le premier formulaire de la page #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)
; Obtient une r�f�rence sur la collection de formulaires de la page, ; puis boucle dans la collection pour afficher des informations sur chaque formulaire #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("http://www.autoitscript.com") Local $oForms = _IEFormGetCollection($oIE) MsgBox($MB_SYSTEMMODAL, "Forms Info", "There are " & @extended & " form(s) on this page") For $oForm In $oForms MsgBox($MB_SYSTEMMODAL, "Form Info", $oForm.name) Next
; Obtient une r�f�rence sur la collection de formulaires d'une page, ; puis boucle dans la collection pour afficher des informations sur chaque formulaire ; en montrant l'utilisation de l'index des formulaires #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("http://www.autoitscript.com") Local $oForms = _IEFormGetCollection($oIE) Local $iNumForms = @extended MsgBox($MB_SYSTEMMODAL, "Forms Info", "There are " & $iNumForms & " forms on this page") Local $oForm For $i = 0 To $iNumForms - 1 $oForm = _IEFormGetCollection($oIE, $i) MsgBox($MB_SYSTEMMODAL, "Form Info", $oForm.name) Next