Jump to content

Check if all outstanding amounts are 0.000 in internet explorer


Recommended Posts

I am filling empty text box in IE using this code :

#include <IE.au3>
$oIE = _IEAttach ("Home")
_IELoadWait($oIE)

Local $oStockKg = _IEGetObjById($oIE, "txtbuyingstockinkg0")
Local $iOutStanding, $iKg, $iGram, $oStockKg, $oStockGram, $sStockKg, $sStockGram
Local $oTds, $oTrs = _IETagNameGetCollection($oIE, "tr")
If IsObj($oTrs) Then
    For $i = 1 To $oTrs.Length
        $oTr = $oTrs($i)
        $oTds = _IETagNameGetCollection($oTr, "td")
        If IsObj($oTds) And $oTds.Length = 5 Then
            $iOutStanding = $oTds(1).InnerText
            $iKg = StringLeft($iOutStanding, StringInStr($iOutStanding, ".")-1)
            $iGram = StringTrimLeft($iOutStanding, StringInStr($iOutStanding, "."))
            $sStockKg = $oTds(3).FirstElementChild.getAttribute("id", 2)
            $oStockKg = _IEGetObjById($oIE, $sStockKg)
            If IsObj($oStockKg) Then
             if $oStockKg.Value <> "" then ContinueLoop
            $oStockKg.Value = $iKg
            _IEAction($oStockKg, "Click")
         EndIf

            $sStockGram = $oTds(4).FirstElementChild.getAttribute("id", 2)
            $oStockGram = _IEGetObjById($oIE, $sStockGram)
            If IsObj($oStockGram) Then
               $oStockGram.Value = $iGram
               _IEAction($oStockGram, "Click")
               EndIf
        EndIf
     Next
     $btnnext = _IEGetObjById($oIE,"btnnext")
_IEAction($btnnext,"click")
EndIf

But i want to don't run this code if all (Sugar, Oil) outstanding amounts = 0.000

Inspect Element of outstanding amount value

<td>0.000</td>

 0000.JPG.34a87946b5dfba227006c3204125921d.JPG195424013_fpsautoithelp000.thumb.jpg.12c6f42023da351b958f2033f9c0416b.jpg

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...