Jump to content

Recommended Posts

Posted

 ie table pic

https://imgur.com/a/TcGPaAJ

I have an account aass301~aass309

I want aass301 or aass302 to appear in the table

Click on the corresponding javascript onclick   (is random number link)

<tbody class="list_hover">
            <tr>
            <td width="7%">
               aass301
            </td>
            <td width="7%">A</td>
            <td width="4%">55</td>
            <td width="6%" align="right">
                 
                <a href="javascript:void(0)" onclick="var winMX=window.open('ReportDetail_B_kc.aspx?userid=f699b2d7-4eb3-4d0e-b1b8-7fabffdd7a71&gID=0&m_type=hy&t_FT=1&t_LID=&BeginDate=2018-08-01&EndDate=2018-08-01&t_Balance=1&t_LT=&sltTabletype=&sltPlaytype=','報表註單明細','width=' + screen.width + ',height=' + screen.height + ',top=0,left=0,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no')"><span class="Font_B">534.0</span></a>&nbsp;</td>
            <td width="6%" align="right">-147.4&nbsp;</td>
            <td width="6%" align="right"><span class="tip" tips-title="應收<a class='red'>aass301</a>明細" tips="&nbsp;10:-147.4<br>&nbsp;退:4.6">-142.8</span>&nbsp;</td>
            <td width="5%">0%</td>
            <td width="6%" align="right">0.0&nbsp;</td>
            <td width="5%">0%</td>
            <td width="6%" align="right">0.0&nbsp;</td>
            <td width="6%" align="right">0.0&nbsp;</td>
            <td width="6%" align="right">0.0&nbsp;</td>
            <td width="6%" align="right">0.0&nbsp;</td>
            
            <td width="6%" align="right">0.0&nbsp;</td>
            <td width="6%" align="right">534&nbsp;</td>
            <td width="6%" align="right"><span class="tip" tips-title="應付明細" tips="&nbsp;實數:100%<br>&nbsp;實額:534<br>&nbsp;實占:-147.4<br>&nbsp;實占水:4.6">-142.8</span>&nbsp;</td>
        </tr>
</tbody>
          
           <tbody class="list_hover">
            <tr>
            <td width="7%">
               aass302
            </td>
            <td width="7%">B</td>
            <td width="4%">15</td>
            <td width="6%" align="right">
                 
                <a href="javascript:void(0)" onclick="var winMX=window.open('ReportDetail_B_kc.aspx?userid=22628a30-ccb8-4703-aa3b-1c9e9e4d4e07&gID=0&m_type=hy&t_FT=1&t_LID=&BeginDate=2018-08-01&EndDate=2018-08-01&t_Balance=1&t_LT=&sltTabletype=&sltPlaytype=','報表註單明細','width=' + screen.width + ',height=' + screen.height + ',top=0,left=0,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no')"><span class="Font_B">225.0</span></a>&nbsp;</td>
            <td width="6%" align="right">-145.7&nbsp;</td>

I try to use  

$o_frame1 = _IEFrameGetCollection($oIE, 0)

$oTRs = _IETagNameGetCollection($o_frame1, "tr")

For $oTR In $oTRs
    $oTDs = _IETagNameGetCollection($oTR, "td")

    For $oTD In $oTDs
        $sRowCont = _IEPropertyGet($oTD, "innertext")
;~      $sRowCont = _IEPropertyGet($oTD, "innerhtml")
        ConsoleWrite($sRowCont & @CRLF)
        If $sRowCont == 'aass301' Then
            ConsoleWrite($sRowCont & @CRLF)
            $oLinks = _IETagNameGetCollection($oTR, "a")
            For $oLink In $oLinks

                ConsoleWrite($oLink.innertext & @CRLF)
                _IEAction($oLink, 'click')
                ExitLoop
            Next
        EndIf
    Next
Next

 fail 

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
×
×
  • Create New...