Sign in to follow this  
Followers 0
Romm

2 _IECreateEmbedded () and bug

9 posts in this topic

I create 2 _IECreateEmbedded () in 1 GUICreate("Embedded Web control Test", 1100, 700)

When i navigate first _IECreateEmbedded (), second becomes blank...

If i hide and open it, all is ok...

post-30717-1201855448_thumb.jpg

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I create 2 _IECreateEmbedded () in 1 GUICreate("Embedded Web control Test", 1100, 700)

When i navigate first _IECreateEmbedded (), second becomes blank...

If i hide and open it, all is ok...

Do you have some sample code?

Can we see your code? All of it?

Edited by Bert

Share this post


Link to post
Share on other sites

This is example

#include <GUIConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()


$oIE = _IECreateEmbedded ()
$oIE2 = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 1200, 700)

$GUIActiveX = GUICtrlCreateObj($oIE2, 1, 1, 970, 660)
$GUIActiveX2 = GUICtrlCreateObj($oIE, 980, 1, 100, 600)


GUISetState()     ;Show GUI




_IENavigate ($oIE2, "http://www.3k.mail.ru")
_IENavigate ($oIE, "http://www.3k.mail.ru")

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop

    EndSelect
WEnd

GUIDelete()

Exit

Share this post


Link to post
Share on other sites

Had a bit of a play around, and this seems to have worked :)

#include <GUIConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()


$oIE = _IECreateEmbedded ()
$oIE2 = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 1200, 700)

$GUIActiveX = GUICtrlCreateObj($oIE, 1, 1, 970, 660)
$GUIActiveX2 = GUICtrlCreateObj($oIE2, 980, 1, 100, 600)

GUISetState()    ;Show GUI

_IENavigate ($oIE, "http://www.3k.mail.ru", 0)
_IENavigate ($oIE2, "http://www.3k.mail.ru", 0)

; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop

    EndSelect
WEnd

GUIDelete()

Exit

Share this post


Link to post
Share on other sites

There are definitely some issues in the GUI code when it comes to displaying multiple embedded browser controls. There have been reports similar to this and with TABs in the past, but this is the cleanest piece of code I've seen as a reproducer.

Bert, your code without the loadwait works, but I believe it is simply fortunate timing.

I think that this is a good enough reproducer to file a bug report for the GUI.

Romm, you are welcome to file the bug report if you like. Otherwise, I'll work on this a little later and to a small rewrite to decompose the _IE calls back to straight COM calls (to take IE.au3 out of the picture) and file the report.

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

A bug report has been created for this issue in the Trac system here: http://svn.autoitscript.com/trac/ticket/96

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

Ok dale. It did seem too good to be true :). Any idea why this happens?

Yeah, I think it's a bug :)

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

#9 ·  Posted (edited)

JP closed the bug report in about 45 seconds. In the helpfile for GUICtrlCreateObj it says

'Document Objects' will only be visible if the Windows style $WS_CLIPCHILDREN has been used in GUICreate().

So, change the line

GUICreate("Embedded Web control Test", 1200, 700)

to

GUICreate("Embedded Web control Test", 1200, 700, 0 , 0, $WS_CLIPCHILDREN)

and it works fine.

Dale

Edited by DaleHohm

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