Jump to content

IE commands with pages with frames


pileot
 Share

Recommended Posts

Im using _IEFrameGetCollection to see the frams on a page, and i know theres 5 frams there, but how do i get autoit to work with a specific frame?

Im not sure how the _IEFrameGetCollection command is supposed to work, i know @extended returns the number of frames, but as to the other uses for it, i have no idea.

The help file has:

#include <IE.au3>
$oIE = _IE_Example ("frameset")
$oFrames = _IEFrameGetCollection ($oIE)
$iNumFrames = @extended
For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
    MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

but when i run that it shows "bout blank" three times in a message box... whats happening?

Ok i looked around some more, and i found _IEframegetobjbyname... using that i should be able to use the frame name to select that frame...

heres the problem, all the frames are named the same thing. Is there a "getframebynumber" sort of command?

Edited by pileot
Link to comment
Share on other sites

Im using _IEFrameGetCollection to see the frams on a page, and i know theres 5 frams there, but how do i get autoit to work with a specific frame?

Im not sure how the _IEFrameGetCollection command is supposed to work, i know @extended returns the number of frames, but as to the other uses for it, i have no idea.

The help file has:

#include <IE.au3>
$oIE = _IE_Example ("frameset")
$oFrames = _IEFrameGetCollection ($oIE)
$iNumFrames = @extended
For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
    MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

but when i run that it shows "bout blank" three times in a message box... whats happening?

Ok i looked around some more, and i found _IEframegetobjbyname... using that i should be able to use the frame name to select that frame...

heres the problem, all the frames are named the same thing. Is there a "getframebynumber" sort of command?

_IEFrameGetCollection if the second parameter is a number is not -1 (default) then it will grab the frame object based on a 0 based index. Meaning the first frame = 0, second = 1 , third = 2, and so on and so forth.

Since it returns an object you can use it just like you would use $oIE. So for example this will use _IEaction, and also just a regular command you would use with the regular $oIE object.

#include <IE.au3>
$oIE = _IE_Example ("frameset")
$oFrames = _IEFrameGetCollection ($oIE,1)
MsgBox(0,'',_IEPropertyGet($oFrames,'innerhtml'))
;;;OR
MsgBox(0,'',_IEBodyReadHTML($oFrames))
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...