Jump to content

SOLVED: Embed 2 IE Browsers in 1 Gui


Recommended Posts

I've tried to wrap my head around it but just can't imagine how to embed 2 IE browsers in the same GUI.

Here's what I'm doing so far.

 

#include <GuiConstantsEx.au3>
#include <windowsconstants.au3>
#include <IE.au3>

Global $oIE = _IECreateEmbedded()
; Create a simple GUI for our output

Global $hGUI = GUICreate("Embedded Web control Test", 1280, 580, (@DesktopWidth - 1280) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_MAXIMIZEBOX))
Global $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 1100, 500)

_IENavigate($oIE, "http://xxxxxxxxxx.com")

Global $o_doc = _IEDocGetObj($oIE)
$o_doc.DocumentElement.ScrollTop = 140
$o_doc.DocumentElement.ScrollLeft = 170

GUISetState()
While GUIGetMsg() <> -3
WEnd

 

Edited by Phoenixx177
Link to comment
Share on other sites

Phoenixx177,

Try something like this...

#include <GuiConstantsEx.au3>
#include <windowsconstants.au3>
#include <IE.au3>

Global $oIE_google = _IECreateEmbedded()
Global $oIE_autoit = _IECreateEmbedded()

Global $hGUI = GUICreate("Embedded Web control Test", 1280, 780, (@DesktopWidth - 1280) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_MAXIMIZEBOX))
Global $google = GUICtrlCreateObj($oIE_google, 10, 10, 1100, 300)
Global $autoit = GUICtrlCreateObj($oIE_autoit, 10, 350, 1100, 300)

_IENavigate($oIE_google, "http://www.google.com")
_IENavigate($oIE_autoit, "http://www.autoitscript.com")

GUISetState()
While GUIGetMsg() <> -3
WEnd

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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

×
×
  • Create New...