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")

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")

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

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

Inspect Element of outstanding amount value



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...