Jump to content
Blueman

[solved] IE Embedded Readout not working anymore (Possible BUG)

Recommended Posts

Hey Guys,

Hope that you can help me with something, maybe this is a bug in the new version of AUTOIT but first i will check it with you to know for sure.
I have made a simple GUI with a Embedded IE Object, then i would like to read the HTML with _IEBodyReadHTML(), easy right?

When i use the old IE.au3 include from a year back or so, it is working fine!
When i use the new IE.au3 include came with the new installation that is currently available on autoitscript.com it isnt working (i get a result that says; 0).

Let me show you.

 

Working Example

#include <GUIConstantsEx.au3>
#include <IE_EmbeddedVersioning.au3>
#include <IE_PreVersion.au3> ;Older Version




Example()

Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 1000, 1000)
    Local $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25)

Global $oIE_1 = _IECreateEmbedded()

; CREATE IE OBJECT(S)
GUICtrlCreateObj($oIE_1, 355, 5, 600, 360)

_IENavigate($oIE_1, "https://www.google.nl", 1)

Local $CheckHTML_T = _IEBodyReadHTML($oIE_1)



    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)


    MsgBox(48,"",$CheckHTML_T)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $idOK
                ExitLoop

        EndSwitch
    WEnd

    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
EndFunc   ;==>Example

 

Failing Example

#include <GUIConstantsEx.au3>
#include <IE_EmbeddedVersioning.au3>
#include <IE.au3> ;New Version




Example()

Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 1000, 1000)
    Local $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25)

Global $oIE_1 = _IECreateEmbedded()

; CREATE IE OBJECT(S)
GUICtrlCreateObj($oIE_1, 355, 5, 600, 360)

_IENavigate($oIE_1, "https://www.google.nl", 1)

Local $CheckHTML_T = _IEBodyReadHTML($oIE_1)



    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)


    MsgBox(48,"",$CheckHTML_T)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $idOK
                ExitLoop

        EndSwitch
    WEnd

    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
EndFunc   ;==>Example

 

I have attachted all files and i am testing on Windows 10 with the latest SciTe Program (Not compiled). 
When i compile the script it is showing the same result.

Thanks guys!

IE_PreVersion.au3

IE.au3

IE_EmbeddedVersioning.au3

Share this post


Link to post
Share on other sites

Found the problem in the IE File.
The fresh installation didn't renew the include files, i deleted all and then reinstalled the package.

Everything is ok now!

Topic can be closed :) 

Share this post


Link to post
Share on other sites
18 hours ago, Blueman said:

Topic can be closed :) 

Mark it as "Solved".

Just edit your first post's title :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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

  • Similar Content

    • By moimon
      Hi all. 
      Sorry if my words are confusing because I am not good at English.
      I am writing code to embed website with Recaptcha in GUI. And then, the code will automatically press the "I'm not a robot" button. The problem here is:
         - The code still works fine when entering iFrame to interact with Recaptcha with the URL is "https://www.google.com/recaptcha/api2/demo"
      <snip>
       
         - But for other URLs (such as "https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php"), the code cannot be entered into the iframe.
       
      Code:
      <snip>  
      I did a lot of research but didn't know why.
       I sincerely thanks for the help. 
    • By SkysLastChance
      I am pretty sure the site that I am using was updated and now I am not seeing the same tags/elements that I used to. I tried using a UIAspy to see if I could grab them that way with no luck. 
      What do I need to do to be able to automate this again. Are the elements hidden somewhere?
      Instead of highlighting established account is highlights all of the web page almost. How can I get to the detail again? 
      I used to grab establish account by the name. Now I have nothing to even try to grab. 
      There are not elements in the event viewer either. 
       


       
      This is what happens when I try to inspect the element and click established account. 
      I get the same type of results in chrome
    • By yffulf
      Is there probably a way to click ie popup button and hide or invisible popup button in the same time?
      I try to use WinSetState @SW_hide ,
      the result is ie crashing or no response because button hide and the next click command won't work...
      $oForm=_IEFormGetObjByName($oIE,"form1") $obutton=_IEFormElementGetObjByName($oForm,"btn_OK") $hWnd = _IEPropertyGet($oIE, "hwnd") _IEAction($obutton,"focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") WinWait("", "確定存檔嗎?") WinSetState("","確定存檔嗎?",@SW_Hide) ControlClick("", "確定存檔嗎?", "[CLASS:Button; TEXT:確定; Instance:1;]")  
    • By _leo_
      Hey there!
      I am having a problem with clicking a button in IE. As you can see in the code, there would be a class name to click it, but since this button exists several times with exactly the same code, I can only use the "Noch nicht veröffentlicht" to separate it from the others. But this part is just pure text without any classification. 
      "<div class="checkmark" data-v-1e5b1f70=""><svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 16 16" data-v-1e5b1f70=""><circle cx="8" cy="8" r="8" data-v-1e5b1f70="" /></svg></div>Noch nicht veröffentlicht"
      I was trying to click it with:
      #include <IE.au3> local $oNNVs = _IEFormGetCollection($oIE2) For $oNNV in $oNNVs If String($oNNV.innertext) = "Noch nicht veröffentlicht" Then _IEAction($oNNV, "click") EndIf Next and:
      $inputs = $oIE2.document.getElementsByTagName("div") For $input In $inputs If $input.innertext == "Noch nicht veröffentlicht" then $input.click() EndIf Next But nothing seems to work. Thanks for the help!
    • By dinotom
      Can files be read from the web or the cloud?
      I am trying to read this file but get the file open error.
      #include <FileConstants.au3> #include <MsgBoxConstants.au3> ;Assign the file path to a variable Local $sFilePath = "C:\Automation\test.txt" Local $sFilePathAzure ="https://batlgroupimages.blob.core.windows.net/files/test.txt" Local $nLineNumberToLookFor = 0 ;Open the file test.txt in append mode. ;If the folder C:\Automation does not exist, it will be created. Local $hFileOpen = FileOpen($sFilePathAzure, $FO_APPEND + $FO_CREATEPATH) ;Display a message box in case of any errors. If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred while opening the file.") EndIf ;Set the file position to beginning for reading the data from the beginning of the file. FileSetPos($hFileOpen, 0, $FILE_BEGIN) ;Read the data from the file using the handle returned by FileOpen ;Local $sFileRead = FileRead($hFileOpen) ;Read the 2nd line of data from the file using the handle returned by FileOpen Local $sFileReadLine = FileReadLine ($hFileOpen,2) ;Close the handle returned by FileOpen. FileClose($hFileOpen)  
×
×
  • Create New...