Sign in to follow this  
Followers 0
Phoenixx177

SOLVED: Embed 2 IE Browsers in 1 Gui

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted

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

1 person likes this

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

Share this post


Link to post
Share on other sites

#3 ·  Posted

Kylomas, you are the man!  Many thanks.  That's exactly what I needed!  Just couldn't wrap my head around it.

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

  • Similar Content

    • fatpig
      By fatpig
      Dear AutoIT Community.
      I am currently working on a program that will display lots of images in a scroll down GUI.
      I create the GUI based on the number of images, which works fine.
      But all images I place using GuiCtrlCreatePic above a threshold of around 32000 pixels (cant say exactly) are placed at negative locations and finally will reach 0 again
      and will then populate on top of the images placed there before.
      For $i = 1 To $Images[0] ; Get picture dimensions $hImage = _GDIPlus_ImageLoadFromFile($ImgRep & $Images[$i]) $iX = _GDIPlus_ImageGetWidth($hImage) $iY = _GDIPlus_ImageGetHeight($hImage) _GDIPlus_ImageDispose($hImage) ; Resize & place images in GUI $Pic[$i] = GUICtrlCreatePic($ImgRep & $Images[$i], $Spacer, Round($yPos, 0), $MaxImgWidth, $MaxImgWidth * ($iY / $iX)) $yPos = $yPos + $MaxImgWidth * ($iY / $iX) + $Spacer $log = $log & "|" & $yPos $currentlut = $Images[1] Next I have found a limit at 32767 pixels for some GUI elements when googling around.
      Can someone tell me how to circumvent that?
      thanks!
      cheers
      Felix
    • Shirdish_chakravarthi
      By Shirdish_chakravarthi
      Hello Guys this is my gui and i need the numeric value typed in the highlighted  inputbox. if this value is greater than 1 i need to perform some operations
      \
       
      Here is the summary about that field which i got from wininfo tool

      i tried writing the code as shown below.. but the msgbox is popping up empty value..when the same code is pasted under some button action i am able to access the value present in the field..but when placed alone as written in the attached script i am unable to fetch it... 

      here i am using the valu present in the field

      can you guys tell me what's wrong??? or how can i get that value?
       
      My_GUI.au3

    • Neonovaz
      By Neonovaz
      Hello
       
      Is there anyway to store word documents in Autoit GUI? For example I have a instruction sheet that I want to bundle up with the exe.

      So a user simply clicks the icon and the stored document will launch  (Something like how you can add objects like excel sheets in word documents )

      (I Know we can launch word files from script directory)

       
    • hemichallenger
      By hemichallenger
      Not sure if this is possible or if someone has already tackled this. Is it possible to embed PowerShell into a GUI? Autoit is great for quick function but sometime I need to run a command thru PowerShell. It be great to have PowerShell console embedded into the gui.
    • Miliardsto
      By Miliardsto
      Im creating a tab
      Global $Tab1 = GUICtrlCreateTab(30, 30, 600, 420, $TCS_BUTTONS, -1) And what we see in the function reference:
      https://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateTab.htm
      GUICtrlCreateTab ( left, top [, width [, height [, style = -1 [, exStyle = -1]]]] ) ok in 5 arg I got $TCS_BUTTONS
      But How can I use multiple args like this below
      Global $Tab1 = GUICtrlCreateTab(30, 30, 600, 420, [$TCS_BUTTONS, $TCS_MULTILINE], -1)