Simulate a mouse click on an <input type=image>. Match by sub-string match of alt text, name or src.
#include <IE.au3>
_IEFormImageClick(ByRef $o_object, $s_linkText [, $s_mode = "src" [, $i_index = 0 [, $f_wait = 1]]])
| $o_object | Object variable of any DOM element (will be converted to the associated document object) |
| $s_linkText | Value used to match element - treatment based on $s_mode |
| $s_mode | [optional] specifies search mode src = (Default) match the url of the image name = match the name of the image alt = match the alternate text of the image |
| $i_index | [optional] If the img text occurs more than once, specifies which instance you want by 0-based index |
| $f_wait | [optional] specifies whether to wait for page to load before returning 0 = Return immediately, not waiting for page to load 1 = (Default) Wait for page load to complete before returning |
| Success: | Returns -1 |
| Failure: | Returns 0 and sets @ERROR |
| @Error: | 0 ($_IEStatus_Success) = No Error |
| 1 ($_IEStatus_GeneralError) = General Error | |
| 3 ($_IEStatus_InvalidDataType) = Invalid Data Type | |
| 4 ($_IEStatus_InvalidObjectType) = Invalid Object Type | |
| 5 ($_IEStatus_InvalidValue) = Invalid Value | |
| 6 ($_IEStatus_LoadWaitTimeout) = Load Wait Timeout | |
| 7 ($_IEStatus_NoMatch) = No Match | |
| 8 ($_IEStatus_AccessIsDenied) = Access Is Denied | |
| 9 ($_IEStatus_ClientDisconnected) = Client Disconnected | |
| @Extended: | Contains invalid parameter number |
; *******************************************************
; Example 1 - Open a browser with the form example, click on the
; <input type=image> form element with matching alt text
; *******************************************************
#include <IE.au3>
Local $oIE = _IE_Example("form")
_IEFormImageClick($oIE, "AutoIt Homepage", "alt")
; *******************************************************
; Example 2 - Open a browser with the form example, click on the <input type=image>
; form element with matching img source URL (sub-string)
; *******************************************************
#include <IE.au3>
$oIE = _IE_Example("form")
_IEFormImageClick($oIE, "autoit_6_240x100.jpg", "src")
; *******************************************************
; Example 3 - Open a browser with the form example, click on the
; <input type=image> form element with matching name
; *******************************************************
#include <IE.au3>
$oIE = _IE_Example("form")
_IEFormImageClick($oIE, "imageExample", "name")