Skip to content

Commit 7e7be84

Browse files
committed
Added: Clarification on how to click image control for _WinHttpSimpleFormFill.
1 parent d5bda5a commit 7e7be84

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

WinHttp.au3

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,9 @@ EndFunc
10981098
; +As for fields, If [["name:FieldName"]] option is used all the fields except last with that name are removed from the form. Last one is filled with specified [[$sDta]] data.
10991099
; +This function can be used to fill forms with up to 40 fields at once.
11001100
; +"Submit" control you want to keep (click) set to True. If no such control is set then the first one found in the form is "clicked". You can also use [["type:submit", zero_based_index_of_the_submit]] to "click" if no id or name is available.
1101-
; All other "submit" controls are removed from the submited form. "Checkbox" and "Button" input types are removed from the submitted form unless explicitly set. Same goes for "Radio" with exception that
1101+
; +All other "submit" controls are removed from the submited form (including images).
1102+
; +If form is submitted by clicking an image then pass click coordinates [["name:image_name", "Xcoord,Ycoord"]] or [["image_id", "Xcoord,Ycoord"]]. If the image has no name or id then you can use its index of appearance [["type:image", "zero_based_index_of_the_image Xcoord,Ycoord"]].
1103+
; +"Checkbox" and "Button" input types are removed from the submitted form unless explicitly set. Same goes for "Radio" with exception that
11021104
; only one such control can be set, the rest are removed. These controls are set by their values. Wrong value makes them invalid and therefore not part of the submited data.
11031105
; +All other non-set fields are left default.
11041106
; +Last (superfluous) [[$sAdditionalData]] argument can be used to pass authorization credentials in form [["[CRED:username:password]"]], magic string to ignore certificate errors in form [["[IGNORE_CERT_ERRORS]"]], change output type to extended array with [["[RETURN_ARRAY]"]] moniker, and/or HTTP request header data to add.
@@ -2083,12 +2085,16 @@ Func __WinHttpNormalizeActionURL($sActionPage, ByRef $sAction, ByRef $iScheme, B
20832085
EndFunc
20842086

20852087
Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, ByRef $aInput, ByRef $sAction, ByRef $sEnctype, ByRef $sMethod)
2086-
; Clicking "submit" or "image" is done using:
2088+
; Clicking "submit" is done using:
20872089
; "type:submit", zero_based_index_of_the_submit_button
2088-
; "type:image", zero_based_index_of_the_image_control Xcoord,Ycoord
20892090
; "name:whatever", True
20902091
; "id:whatever", True
20912092
; "whatever", True ;<- same as "id:whatever"
2093+
; Clicking "image" is done using:
2094+
; "type:image", "zero_based_index_of_the_image_control Xcoord,Ycoord"
2095+
; "name:whatever", "Xcoord,Ycoord"
2096+
; "id:whatever", "Xcoord,Ycoord"
2097+
; "whatever", "Xcoord,Ycoord" ;<- same as "id:whatever"
20922098
Local $aSpl, $iSubmitHTML5 = 0, $iInpSubm, $sImgAppx = "."
20932099
For $k = 1 To $iNumParams
20942100
$aSpl = StringSplit($aFlds[$k], ":", 2)

0 commit comments

Comments
 (0)