Sign in to follow this  
Followers 0
anhchangtk

Problem wih _IEBodyFindText [author yehia]

2 posts in this topic

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
    EndIf
    If Not __IEIsObjType($o_object, "documentContainer") Then
        __IEErrorNotify("Error", "_IEBodyFindText", "$_IEStatus_InvalidObjectType")
        SetError($_IEStatus_InvalidObjectType, 1)
        Return 0
    EndIf
    If Not IsInt($i_SearchScope) Or IsInt($i_Flags) Then
        __IEErrorNotify("Error", "_IEBodyFindText", "$_IEStatus_InvalidValue", "Invalid integer value")
        SetError($_IEStatus_InvalidValue, 3)
        Return 0
    EndIf
    $oDoc = $o_object.document
    $oTextRange = $oDoc.body.createTextRange()
    $found = $oTextRange.findText($s_text,$i_SearchScope,$i_Flags)
    If $found = -1 Then
        SetError($_IEStatus_Success)
        Return 1
    EndIf
EndFunc
$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



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  
Followers 0