Jump to content
Sign in to follow this  
SeF

Help with IE_Embedded and multiple sites

Recommended Posts

SeF

Hi there!

I'm trying to create 2+ IE_Embeddeds on the same GUI using Tabs. But, the first one is the only one that I can interact with. I don't know what I'm doing wrong.

Example Code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <GUIListBox.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

$Form2 = GUICreate("Auto SAP - Cadastro VC", 1017, 683, 0, 18, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_OVERLAPPEDWINDOW, $WS_TILEDWINDOW, $WS_MAXIMIZE, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_TABSTOP, $WS_BORDER, $WS_CLIPSIBLINGS), 0)
$Tab1 = GUICtrlCreateTab(8, 8, 689, 665)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Google")
GUICtrlCreateTabItem("")
$StatusBar1 = _GUICtrlStatusBar_Create($Form2)
GUISetState(@SW_SHOW)

$oIE_1 = _IECreateEmbedded()
$GUI_1 = GUICtrlCreateObj($oIE_1, 10, 40, 689, 640)
_IENavigate($oIE_1, "http://www.google.com")

$Tab2 = GUICtrlCreateTabItem("AutoIt")
$Tab_Pos = _GUICtrlTab_GetCurSel($Tab1)
_GUICtrlTab_ClickTab($Tab1, $Tab_Pos + 1)
$oIE_2 = _IECreateEmbedded()
$GUI_2 = GUICtrlCreateObj($oIE_2, 10, 40, 689, 640)
_IENavigate($oIE_2, "http://www.autoitscript.com")

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Thanks! :D


Share this post


Link to post
Share on other sites
DaleHohm

Search the forum for IECreate2 and use that technique in this case instead of _IECreateEmbedded. You get full browser object and no keyboard problems.

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
SeF

Thanks Dale! :

But, how can I use it in a Tabbed GUI (Like, 3-5 tabs)?

Can you show me a little code example? :D

And can I use it with the own Tab from IE? (Just to avoid creating 5 iexplore.exe process)

Thanks! :huggles:


Share this post


Link to post
Share on other sites
DaleHohm

Sorry, no sample code. You'll need to experiment.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.