Jump to content

Reading a specific line from a webpage


Recommended Posts

This part I need the program to look at looks like this

<div class="fw-text"> <!-- ParagraphBodyStart --><P>Block 1</P>

<P>## . ## . ## . ##</P>

<P>## . ## . ## . ##</P>

<P>## . ## . ## . ##</P>

<P>&nbsp;</P>

<P>Block 2</P>

<P>## . ## . ## . ##</P>

<P>## . ## . ## . ##</P>

<P>## . ## . ## . ##</P><!-- ParagraphBodyEnd --> </div>

If you really need the website I can post that if you would like

Link to comment
Share on other sites

  • Moderators

Assuming this webpage does not contain frames this should work.

#include <IE.au3>

$sText = ""
$sURL = "www.YourWebpage.com"
$oIE = _IECreate($sURL)
$oDivs = _IETagNameGetCollection($oIE, "DIV")
For $oDiv In $oDivs
    If $oDiv.className = "fw-text" Then
        $sText = $oDiv.innerText
        ExitLoop
    EndIf
Next
ConsoleWrite($sText & @CR)
Link to comment
Share on other sites

  • 4 years later...

this is really close to what im looking for but i want to make it do one of 2 mouse clicks 1 if it matches and the other if it doesnt and also is there any way to make it look for the first one on the page since there is multiple lists of them for example if u play games on fb your gift page im wanting it to look at the first gift and if it mates then to do mouse click here and there both what im wanting to use this for and facebook gift page is written with <div> so there is multiple. maybe if it looks in a specific area of the page if thats possable. i will be watching this thread for a reply

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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