Jump to content

Searching for a certain string in the HTML


BALA
 Share

Recommended Posts

I'm trying to search for specific strings inside an HTML source I got using _IEDocReadHTML. I wandering how I could do this, perhaps with one of the String functions or such.

EDIT: Corrected a typo: "string" should have been "strings"

Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

hi

in case you need only the text (not the full HTML code)

$sText = _IEBodyReadText($oIE)

or the full html code

$sText = _IEBodyReadHTML($oIE)

now the $sText can the used as any other string variable..

If StringInStr($sText, "login.gif") > 0 Then

nobbe

Link to comment
Share on other sites

Thanks for the respond, but StringInStr isn't exactly what I'm looking for. I need a command that will search for 2 strings ("string1" and "string2"), then copy anything in between those two strings. I'm pretty sure there's a function that does that, I just can't remember what it's called.

Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

  • Moderators

2 strings ("string1" and "string2"), then copy anything in between those two strings. I'm pretty sure there's a function that does that, I just can't remember what it's called.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...