Jump to content

_IEPropertyGet failed on Frame collection


Recommended Posts

Hi,

since several days I have a script part that doesn't work anymore calling information on frame.

I get a collection with 5 frames but all request on the any frame (direct by name or using the loop like below) return at least an empty information

_IEPropertyGet return 0 with a error 5 (5 ($_IEStatus_InvalidValue) = Invalid Value)

or a direct error on object in IE.AU3 library

Return SetError($_IEStatus_Success, 0, $o_object.location.href())
line 2692 of IE.AU3

The request action with this object has failed (when using the "locationurl" property)

#include <IE.au3>

$strURL = "my url is here and below attach works perfectly"

$oIE = _IEAttach ( $strURL, "URL")
;$oIE = _IECreate( $strURL)
if @error > 0 then
    msgbox( 0, "Debug", " Erreur attaching: " & @Error)
endif

$oFrames = _IEFrameGetCollection( $oIE)
$iNumFrames = @extended
;msgbox( 0, "Debug", "Frame: " & $iNumFrames)
For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
    ;if IsObj ( $oFrame) Then
    if @error < 1 then
        MsgBox(0, "Frame Info", "Frame (" & $i & "): [" & _IEPropertyGet ($oFrame, "Name") & "]. Error: " & @Error)

        ;MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
    Else
        MsgBox(0, "Frame Error", "Frame: " & $i & " erreur: " & @error)
    EndIf
Next
Link to comment
Share on other sites

looking further, here is what I discover on this:

I check the object name after getting the "Frame" with this code

For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
    MsgBox( 0, "Debug", "Object name: " & ObjName( $oFrame))
Next

the object are all (normal, there are from the same collection): DispHTMLWindow2

looking a bit on this type of object (Some properties and methods) I try a direct attribut call

For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
    MsgBox(0, "Frame Info", $oFrame.name)
Next

and this works fine.

Don't know why the IE.AU3 doesn't work anymore (no upgrade nor update of web, OS or new soft installed except Tessarct (Free OCR)) but this does not change the browser (and related dll) normaly

Link to comment
Share on other sites

Suggest you add _IEErrorHandlerRegister() to your code and see what else is written to the console.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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...