Search the Community
Showing results for tags '_iebodyreadhtml'.
-
I am adding labour charge to total paid amount using : #include <IE.au3> #include <Array.au3> $oIE = _IEAttach ("Shop") $oTable = _IETableGetCollection ($oIE, 1) $aTableData3 = _IETableWriteToArray ($oTable) Local $sitem1 = $aTableData3[5][1] Local $sitem2 = $aTableData3[5][2] Local $lcharge = "10" ;add manualy using inputbox, becuase not generating online Local $atotPric = "Payable Total Price " Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If $oTd.Innertext = $atotPric Then $iatotPric = $oTd.NextElementSibling.innertext MsgBox (0, "2", $iatotPric) EndIf Next $irCtotal = StringFormat("%.2f", $sitem1 + $sitem2 + $lcharge) $crTotp = StringReplace(_IEBodyReadHTML($oIE), $iatotPric, $irCtotal) _IEBodyWriteHTML ($oIE, $crTotp) But, It was also changing Total price, I want to change only Payable Total Price.
- 5 replies
-
- stringreplace
- stringregexpreplace
- (and 3 more)
-
Hi there, to read page and go next i always use this function: #include <Array.au3> #include <IE.au3> $oIE = _IECreate('http://autoitscript.com/forum') $sHTML = _IEBodyReadHTML($oIE) ; read Body $aFile = @TempDir&'au3test.tmp' ; create File $wFile = FileWrite($aFile,$sHTML) ; write Body to File $oFile = FileOpen($aFile, 0) ; open File and then make some function to use site information like: While 1 Local $aRead = FileReadLine($oFile) If @error then ExitLoop $aSearch = StringInStr($aRead,'<LI><SPAN') If $aSearch > 0 Then $aArray = _StringBetween($aRead, 'href="', '"') _ArrayDisplay($aArray) EndIf WEnd But this method i think is too slow, can someone give me some tips how i can make this function more fast? Thanks if advance for any tips.. EDIT: Fix code