Jump to content
Sign in to follow this  
sfblue

_IEFrameGetCollection problem on myspace IE.au3

Recommended Posts

sfblue

If I try to execute _IEFrameGetCollection against the myspace login page (www.myspace.com) I get the error

line 2952 (File "C:\Program Files\AutoIt3\Include\IE.au3")

return $o_object.location.href()

return $object.location.href()^ERROR Error: The requested object action with this object has failed.

Other things in the #included IE.au3 seem to work fine.

'About' says I am using SciTE4AutoIt3 Version 1.71 May 25 2007 15:29:13

If anyone can give advice it would be much appreciated!

The code is taken from the _IEFrameGetCollection in the help file with a slight modification to point it at myspace:

#include <IE.au3>

$sURL = "http:\\www.myspace.com"

$oIE = _IECreate($sURL)

$oFrames = _IEFrameGetCollection ($oIE)

$iNumFrames = @extended

For $i = 0 to ($iNumFrames - 1)

$oFrame = _IEFrameGetCollection ($oIE, $i)

MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))

Next

Edited by sfblue

Share this post


Link to post
Share on other sites
Valuater

No prob here

#include<IE.au3>

$oIE = _IECreate("www.myspace.com")

$oFrame = _IEFrameGetCollection($oIE)
MsgBox(0, "DKB debug. Display frame count", "@error: " & @error & @CR & "framecount=@extended: " & @extended & @CR & "$oFrame: >" & $oFrame & "<")

$oFrame = _IEFrameGetCollection($oIE, 0)
MsgBox(0, "DKB debug Display first frame info", "@error: " & @error & @CR & "@extended: " & @extended & @CR & "$oFrame: >" & $oFrame & "<")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Valuater

#include <IE.au3>

$sURL = "http:\\www.myspace.com"

$oIE = _IECreate($sURL)

$oFrames = _IEFrameGetCollection ($oIE)

$iNumFrames = @extended

For $i = 0 to ($iNumFrames - 1)

$oFrame = _IEFrameGetCollection ($oIE, $i)

MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))

Next

That would work if the frames had links in them...

this works in your case

#include<IE.au3>

$oIE = _IECreate("www.myspace.com")

$oFrame = _IEFrameGetCollection($oIE)

$iNumFrames = @extended

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

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
sfblue

Fantabulous, many thanks

Share this post


Link to post
Share on other sites
Valuater

Fantabulous, many thanks

You might want to take a look at IE-Builder

it shows all the info for web pages

Edited by Valuater

NEWHeader1.png

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  

×