Reset a specified Form setting the values back to their loaded defaults
#include <IE.au3>
_IEFormReset ( ByRef $oObject )
$oObject | Object variable of an InternetExplorer.Application, Form object |
Success: | 1. |
Failure: | 0 and sets the @error flag to non-zero. |
@error: | 2 ($_IEStatus_COMError) - COM Error in Object reference 3 ($_IEStatus_InvalidDataType) - Invalid Data Type 4 ($_IEStatus_InvalidObjectType) - Invalid Object Type |
@extended: | Contains invalid parameter number |
_IEFormGetCollection, _IEFormGetObjByName, _IEFormSubmit
; Open a browser with the form example, fill in a form field and
; reset the form back to default values
#include <IE.au3>
Local $oIE = _IE_Example("form")
Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
Local $oText = _IEFormElementGetObjByName($oForm, "textExample")
_IEFormElementSetValue($oText, "Hey! It works!")
Sleep(2000)
_IEFormReset($oForm)