Jump to content

HTML table, the first two rows


Recommended Posts

Hello, there is a table

<table cellspacing="0" cellpadding="5">
   <tr>
      <td class="tsrsbsls"><b>Data</b></td>
      <td class="tsrsbsls"><b>No.</b></td>
      <td class="tsrsbsls"><b>sum1</b></td>
      <td class="tsrsbsls"><b>sum2</b></td>
      <td class="tsrsbsls"><b>WM</b></td>
      <td class="tsrsbsls"><b>status</b></td>
   </tr>
   <tr>
      <td class="tsrsbsls" align="center">01.01.2012 20:00</td>
      <td class="tsrsbsls" align="center">57277</td>
      <td class="tsrsbsls" align="right">100500.00</td>
      <td class="tsrsbsls" align="right">100500.00</td>
      <td class="tsrsbsls" align="center">R0123456789</td>
      <td class="tsrsbsls" align="center">canceled</td>
   </tr>
..then another 100 rows..that did not interest me..

first line - is the title, I do not need

need a second line, the last cell in the table (the text in it can be different), how to tear?

As a result of a..

MsgBox(16, "Status:", $status)
Link to comment
Share on other sites

With the example you gave, the following should work, its lighter weight than messing around with _ie functions.

$aResult=stringregexp($sSource,'<td class="tsrsbsls" align="center">(.*)</td>',3)

MsgBox(16, "Status:", $aResult[ubound($aResult)-1)
Edited by DicatoroftheUSA
Link to comment
Share on other sites

What does "lighter weight" mean, exactly?

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

sorry, a little easier the task

as interested only in the second line of the last cell, but only if it contains the text "completed" - take for example msgbox,

! but do not pay attention to the line and below the cell, they can also present this text

PS need it _ie

Link to comment
Share on other sites

PS need it _ie

Look at the functions that @jdelaney suggests - it will place the value you are interested in into a unique array element. Try it and if you have trouble, post your code.

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...