Jump to content
Sign in to follow this  
Nishant

Search a Text in my Web Page

Recommended Posts

Nishant

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

Share this post


Link to post
Share on other sites
NeoFoX

#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]

Share this post


Link to post
Share on other sites
evilelf

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.

Share this post


Link to post
Share on other sites
Tukata

By the way, is there a way to add a button to the HTML source code which will triger the "Find" function ?

Thanks

Tuk

Edited by Tukata

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.