Jump to content

Search a Text in my Web Page


Nishant
 Share

Recommended Posts

I want to search a Text in my Web Page. Is this Possible?

My Text is: "YAY! event triggered successfully Saved Document". I want to search this text in my web page, if this exists then My work is successful otherwise there should be some error.

Can u please tell me about that. Is this possible? How?

Thanks

Link to comment
Share on other sites

#include <IE.au3>
$oIE = _IE_Example ("basic")
$sText = _IEBodyReadText($oIE)
If StringInStr($sText, "language") = "" Then
    MsgBox(1,"test","not found the text language")
Else
    MsgBox(1,"test","found text language")
EndIf

Will help you ;)

Neo

[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

Link to comment
Share on other sites

Just a small optimization.

#include <IE.au3>

$sURL = "www.YourWebpage.com"
$sSearch = "Your Search String"

$oIE = _IECreate ($sURL)
If StringInStr(_IEBodyReadText($oIE), $sSearch) Then
    MsgBox(0 ,"Success","The text was found.")
Else
    MsgBox(0 ,"Error","The text was NOT found.")
EndIf
Very Nice this now can help in alot of othere ways.
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...