Skip to content

Commit d4240b1

Browse files
authored
1 parent e82bc44 commit d4240b1

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

WinHttp.au3

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,11 +2135,11 @@ Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, By
21352135
; "name:whatever", "Xcoord,Ycoord"
21362136
; "id:whatever", "Xcoord,Ycoord"
21372137
; "whatever", "Xcoord,Ycoord" ;<- same as "id:whatever"
2138-
Local $aSpl, $iSubmitHTML5 = 0, $iInpSubm, $sImgAppx = "."
2138+
Local $aSpl, $iSubmitHTML5 = 0, $iInpSubm, $sImgAppx = ".", $sInpNme, $sType, $iX = 0, $iY = 0, $aStrSplit
21392139
For $k = 1 To $iNumParams
21402140
$aSpl = StringSplit($aFlds[$k], ":", 2)
21412141
If $aSpl[0] = "type" And ($aSpl[1] = "submit" Or $aSpl[1] = "image") Then
2142-
Local $iSubmIndex = $aDtas[$k], $iSubmCur = 0, $iImgCur = 0, $sType, $sInpNme
2142+
Local $iSubmIndex = $aDtas[$k], $iSubmCur = 0, $iImgCur = 0
21432143
If $aSpl[1] = "image" Then
21442144
$iSubmIndex = Int($aDtas[$k])
21452145
EndIf
@@ -2159,7 +2159,6 @@ Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, By
21592159
$sInpNme = __WinHttpAttribVal($aInput[$iInpSubm], "name")
21602160
If $sInpNme Then $sInpNme &= $sImgAppx
21612161
$aInput[$iInpSubm] = 'type="image" formaction="' & __WinHttpAttribVal($aInput[$iInpSubm], "formaction") & '" formenctype="' & __WinHttpAttribVal($aInput[$iInpSubm], "formenctype") & '" formmethod="' & __WinHttpAttribVal($aInput[$iInpSubm], "formmethod") & '"'
2162-
Local $iX = 0, $iY = 0
21632162
$iX = Int(StringRegExpReplace($aDtas[$k], "(\d+)\h*(\d+),(\d+)", "$2", 1))
21642163
$iY = Int(StringRegExpReplace($aDtas[$k], "(\d+)\h*(\d+),(\d+)", "$3", 1))
21652164
ReDim $aInput[UBound($aInput) + 2]
@@ -2171,7 +2170,7 @@ Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, By
21712170
EndSwitch
21722171
Next
21732172
ElseIf $aSpl[0] = "name" Then
2174-
Local $sInpNme = $aSpl[1], $sType
2173+
$sInpNme = $aSpl[1]
21752174
For $i = 0 To UBound($aInput) - 1 ; for all input elements
21762175
$sType = __WinHttpAttribVal($aInput[$i], "type")
21772176
If $sType = "submit" Then
@@ -2184,7 +2183,7 @@ Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, By
21842183
If __WinHttpAttribVal($aInput[$i], "name") = $sInpNme And $aDtas[$k] Then
21852184
$iSubmitHTML5 = 1
21862185
$iInpSubm = $i
2187-
Local $aStrSplit = StringSplit($aDtas[$k], ",", 3), $iX = 0, $iY = 0
2186+
$aStrSplit = StringSplit($aDtas[$k], ",", 3)
21882187
If Not @error Then
21892188
$iX = Int($aStrSplit[0])
21902189
$iY = Int($aStrSplit[1])
@@ -2199,7 +2198,7 @@ Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, By
21992198
EndIf
22002199
Next
22012200
Else ; id
2202-
Local $sInpId, $sType
2201+
Local $sInpId
22032202
If @error Then
22042203
$sInpId = $aSpl[0]
22052204
ElseIf $aSpl[0] = "id" Then
@@ -2217,9 +2216,9 @@ Func __WinHttpHTML5FormAttribs(ByRef $aDtas, ByRef $aFlds, ByRef $iNumParams, By
22172216
If __WinHttpAttribVal($aInput[$i], "id") = $sInpId And $aDtas[$k] Then
22182217
$iSubmitHTML5 = 1
22192218
$iInpSubm = $i
2220-
Local $sInpNme = __WinHttpAttribVal($aInput[$iInpSubm], "name")
2219+
$sInpNme = __WinHttpAttribVal($aInput[$iInpSubm], "name")
22212220
If $sInpNme Then $sInpNme &= $sImgAppx
2222-
Local $aStrSplit = StringSplit($aDtas[$k], ",", 3), $iX = 0, $iY = 0
2221+
$aStrSplit = StringSplit($aDtas[$k], ",", 3)
22232222
If Not @error Then
22242223
$iX = Int($aStrSplit[0])
22252224
$iY = Int($aStrSplit[1])

0 commit comments

Comments
 (0)