Jump to content
Sign in to follow this  

Problem wih _IEBodyFindText [author yehia]

Recommended Posts


I had used Functions IE New of author yehia but when me made with function _IEBodyFindText then not found anything although the text has on site :)

And this is my code

#include <IE.au3>
Func _IEBodyFindText(ByRef $o_object, $s_text, $i_SearchScope = 0, $i_Flags = 0)
    If Not IsObj($o_object) Then
        __IEErrorNotify("Error", "_IEBodyFindText", "$_IEStatus_InvalidDataType")
        SetError($_IEStatus_InvalidDataType, 1)
        Return 0
    If Not __IEIsObjType($o_object, "documentContainer") Then
        __IEErrorNotify("Error", "_IEBodyFindText", "$_IEStatus_InvalidObjectType")
        SetError($_IEStatus_InvalidObjectType, 1)
        Return 0
    If Not IsInt($i_SearchScope) Or IsInt($i_Flags) Then
        __IEErrorNotify("Error", "_IEBodyFindText", "$_IEStatus_InvalidValue", "Invalid integer value")
        SetError($_IEStatus_InvalidValue, 3)
        Return 0
    $oDoc = $o_object.document
    $oTextRange = $oDoc.body.createTextRange()
    $found = $oTextRange.findText($s_text,$i_SearchScope,$i_Flags)
    If $found = -1 Then
        Return 1
$oIE = _IECreate ("http://google.com.vn")
$b = _IEBodyReadText ($oIE)
$test = _IEBodyFindText ($oIE, "Blog",0,0)
msgbox (0,"",$test)

Please help me !!!

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.