Jump to content

Read Page and Copy whats next to it


Recommended Posts

I'm trying to get it so that I can read a webpage and copy text that next to the text I search for

so if the pages says

This is an example page

it could find "This is" and then copy "example page" to a variable

Are you using the IE.au3 UDF? Have you opened IE and navigated to the page? Have you read the HTML to a string variable? How far along are you?

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

sorry I don't have the code on this computer that I'm posting from or I would post what I have so far

I have it so that it has read the page and put it in a string variable

Then it's just:

$SearchTerm = "This is an "
$String = "This is an example page"
If StringInStr($String, $SearchTerm) Then _
        $String = StringMid($String, StringInStr($String, $SearchTerm) + StringLen($SearchTerm))

MsgBox(64, "Result", '"' & $String & '"')

There's probably a slicker (read RegExp) way, but this works within my "AutoIt For Dummies" understanding.

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...