Jump to content

Recommended Posts

I am trying to read 310.00 from <td>, But it returning empty

#include <IE.au3>
#include <Array.au3>
$oIE = _IEAttach ("Shop")

Local $totPri = '<td style="text-align: right;" colspan="5">Total Price&nbsp;</td>' , $totPri = "0"
Local $oTds = _IETagNameGetCollection($oIE, "td")
For $oTd In $oTds
    If $oTd.InnerText = $totPri Then
        $totPri = $oTd.NextElementSibling.innertext
MsgBox (0, "", $totPri)



Link to post
Share on other sites

I would try to read the whole table with the _IETableWriteToArray () function and then analyze the data in the returned array, I think it should be more convenient.

however, in your script you declare the variable $totPri first with a string and immediately after with a "0".

Local $totPri = '<td style="text-align: right;" colspan="5">Total Price&nbsp;</td>' , $totPri = "0"

Since the InnerText property returns only the contents of the cell and not the entire Tag, you should compare the string returned by $oTd.InnerText with "Total Price". then try declaring the variable as

Local $totPri = "Total Price"

and it should work.

Edited by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to post
Share on other sites

i am trying to get text from label between <td> tag but it was say not found.

#include <IE.au3>
$oIE1 = _IEAttach ("Shop")
Local $stext = ' Bhindi'
;~Local $oTds = _IETagNameGetCollection($oIE1, "label")
Local $oTds = _IETagNameGetCollection($oIE1, "td")
For $oTd In $oTds
   If $oTd.InnerText = $stext Then
        $iStext = $oTd.NextElementSibling.InnerText
           MsgBox(0, "Found", $iStext)
           MsgBox(0, "", "Not Found")
<tr title="" style="width: 25px;" data-original-title= Enter amount to take!" data-toggle="tooltip" data-placement="bottom">
                                    <td><label for=""> Bhindi</label> </td>


Link to post
Share on other sites
15 minutes ago, Danp2 said:

Isn't this the same problem as described in your previous thread? If so, why not respond there instead of starting all over in a new one?


@Danp2 My previous problem is solved, but this is my different problem, there are text in label. 

Link to post
Share on other sites
  • Developers
2 hours ago, jmp said:

@Danp2 My previous problem is solved, but this is my different problem, there are text in label. 

Does look the same to me as well, and since you didn't have the courtesy to report as such, one can only assume it is the same ....

Merged and stick to one thread in the future!


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

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.

  • Similar Content

    • By xian_lhm
      I am doing a automatic task that key in material number and retrieve the material information from database (The application was developed using Microsoft .Net). I use the ControlSetText to send text to textbox and use ControlGetText to get contents of textbox. But for DISPLAY only textbox, ControlGetText gets nothing. Is there other instruction can do this function? Appreciate for any suggestion. 
    • By kcvinu
      Hi there,
      I need to get text from another application.( A dictionary) But the text area of that program has no control ID. See this image of that program and it's window info.

    • By kcvinu
      Hi all,
      I would like to know how to read or get text from another applications like notepad, word etc.. I have used WinGetText(). But it gives the title and some other text. I need to get what the user types on word or notepad. Please help. Thanks in advance.
    • By krishpun
      I have a control with [ClassNN:TDBWPRichText1]

      I tried using the below, but it is not reading the text, please help

      $data=ControlGetText("Power of Appeals","Government Agency Information","[ClassNN:TDBWPRichText1]")

      The details captured by info tool is below. The ID keeps changing each time I open the application

      >>>> Window <<<<
      Title: Power of Appeals
      Class: TMainForm
      Position: -9, -9
      Size: 1384, 752
      Style: 0x17CF0000
      ExStyle: 0x00010100
      Handle: 0x002203E4
      >>>> Control <<<<
      Class: TDBWPRichText
      Instance: 1
      ClassnameNN: TDBWPRichText1
      Advanced (Class): [CLASS:TDBWPRichText; INSTANCE:1]
      ID: 789304
      Position: 250, 150
      Size: 948, 442
      ControlClick Coords: 336, 132
      Style: 0x56A10000
      ExStyle: 0x00000000
      Handle: 0x000C0B38
      >>>> Mouse <<<<
      Position: 595, 343
      Cursor ID: 0
      Color: 0xFFFFFF
      >>>> StatusBar <<<<
      >>>> ToolsBar <<<<
      >>>> Visible Text <<<<
      Government Agency Information
  • Create New...