Sign in to follow this  
Followers 0
Bert

IE frame question

8 posts in this topic

I know this may sound dumb, and I've looked around a bit, but I'm not finding what I need to do. I'm trying to read the data from a frame, and see if it matches a certain criteria. The problem I'm having is I'm getting a access denied message on my console.

--> COM Error Encountered in test script 1.au3
----> $IEComErrorScriptline = 3042
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = Access is denied.
----> $IEComErrorDescription = 
----> $IEComErrorSource =

I'm doing this and embedding a IE window:

_
$oIE = _IECreateEmbedded ()
$title1 = "Test viewer"
$gui = GUICreate($title1, $w1, $h1, -1, -1 , _
$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, $w2, $h2)
IENavigate ($oIE, "about:blank")
$s_html &= "<HTML>" & @CR
$s_html &= "<HEAD>" & @CR
$s_html &= "<TITLE>CTS Viewer</TITLE>" & @CR
$s_html &= "</HEAD>" & @CR
$s_html &= "<FRAMESET rows='15,550'>" & @CR
$s_html &= "    <FRAME NAME=Top SRC=about:blank>" & @CR
$s_html &= "        <FRAME NAME=Main SRC=about:blank>" & @CR
$s_html &= "    </FRAMESET>" & @CR
$s_html &= "</FRAMESET>" & @CR
$s_html &= "</HTML>"
_IEDocWriteHTML($oIE, $s_html)
_IEAction($oIE, "refresh")
$oFrameTop = _IEFrameGetObjByName($oIE, "Top")
$oFrameMain = _IEFrameGetObjByName($oIE, "Main")
sleep(100)
_IENavigate ($oFrameMain, "http://www.msn.com", 0)oÝ÷ Úz0"Ȧ¦°j{m¢Çûa{¥¨{azf¢úÚè¬iÇ«µ¨§²+^"»§¶¬jëh×6$oFrames = _IEFrameGetCollection ($oIE)
$iNumFrames = @extended
For $i = 0 to ($iNumFrames - 1)
$oFrame = _IEFrameGetCollection ($oIE, $i)
MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

and the top frame reports "about:blank"

the main frame reports nothing. Shouldn't it say http://www.msn.com"?

What am I missing here? I'm using the example out of the help file.

Share this post


Link to post
Share on other sites



I know this may sound dumb, and I've looked around a bit, but I'm not finding what I need to do. I'm trying to read the data from a frame, and see if it matches a certain criteria. The problem I'm having is I'm getting a access denied message on my console.

--> COM Error Encountered in test script 1.au3
----> $IEComErrorScriptline = 3042
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = Access is denied.
----> $IEComErrorDescription = 
----> $IEComErrorSource =

I'm doing this and embedding a IE window:

_
$oIE = _IECreateEmbedded ()
$title1 = "Test viewer"
$gui = GUICreate($title1, $w1, $h1, -1, -1 , _
$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, $w2, $h2)
IENavigate ($oIE, "about:blank")
$s_html &= "<HTML>" & @CR
$s_html &= "<HEAD>" & @CR
$s_html &= "<TITLE>CTS Viewer</TITLE>" & @CR
$s_html &= "</HEAD>" & @CR
$s_html &= "<FRAMESET rows='15,550'>" & @CR
$s_html &= "    <FRAME NAME=Top SRC=about:blank>" & @CR
$s_html &= "        <FRAME NAME=Main SRC=about:blank>" & @CR
$s_html &= "    </FRAMESET>" & @CR
$s_html &= "</FRAMESET>" & @CR
$s_html &= "</HTML>"
_IEDocWriteHTML($oIE, $s_html)
_IEAction($oIE, "refresh")
$oFrameTop = _IEFrameGetObjByName($oIE, "Top")
$oFrameMain = _IEFrameGetObjByName($oIE, "Main")
sleep(100)
_IENavigate ($oFrameMain, "http://www.msn.com", 0)oÝ÷ Úz0"Ȧ¦°j{m¢Çûa{¥¨{azf¢úÚè¬iÇ«µ¨§²+^"»§¶¬jëh×6$oFrames = _IEFrameGetCollection ($oIE)
$iNumFrames = @extended
For $i = 0 to ($iNumFrames - 1)
$oFrame = _IEFrameGetCollection ($oIE, $i)
MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

and the top frame reports "about:blank"

the main frame reports nothing. Shouldn't it say http://www.msn.com"?

What am I missing here? I'm using the example out of the help file.

I don't know anything about ie.au3 but since I can't resist looking at your giraffe I had a quick look. I think you need

_IEPropertyGet($ob,"addressbar"). Looks like the frame name is whatever you set it to.

Could be wrong here, as I said I know nothing ...


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

$oFrames = _IEFrameGetCollection ($oIE)

$iNumFrames = @extended

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

$oFrame = _IEFrameGetCollection ($oIE, $i)

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

Next

This does that. It shows "about:Blank" for the first frame, for that is the url being used. I did notice when I changed the URL to www.msn.com, the report was blank.

This doesn't make any sense

Share this post


Link to post
Share on other sites

It would be very convenient if that would work, but alas, browser security restrictions prevent digging into a frame whose content is in a different domain than the parent (Access is Denied.). Sorry.

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Ok, seeing how I'm being blocked on this route, I'm still running into a issue where I need to use a marquee that gathers it's data from one webpage, reformats it so it scrolls in a ribbon, and have another webpage be shown in the main area. I tried Lod3n's Duel IE approach, but i found it has several issues from windows not being pulled forward to crashes in IE. From what I see, using the frame approach also has a roadblock. ;) This is hurting my head.

I suspect I will have to visit the ticket marquee approach again, but come up with a better method to show one. I've seen many examples, but they all see to have the same problem. Once the end of the line of what you are ticket scrolling is at one end, you have to wait until it gets to the other side before the ticket scroll restarts. Also, it doesn't allow for resizing for both the size of the control (if the text amount isn't a constant), and if you want to have more than one item ticket scrolled. :)

Anyone care to lend some wisdom on how to solve this?

Edited by Volly

Share this post


Link to post
Share on other sites

Your description doesn't make much sense to me... is it a continuation of another thread or am I missing something?

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

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