Jump to content

Embed an internet window inside a GUI?


Recommended Posts

Like i said, i'm stuck. I am trying to embed an internet window in my GUI. I looked in the help file for Inetget but that won't help me. I've seen it done, infact i had the file. But my whole folder on my computer (Yes, only my file. Not my brothers file) got deleted. Including all my autoit stuff. I forget who made the program, and i searched and couldn't find it. But i know (i think) they are a very active member here. Can anyone help me?

Link to comment
Share on other sites

Ok, i'm pretty much set up for this, but as you might be guessing, i'm creating a web browser... well... its pretty much JUSt for gaia. I tried to as a $ES_AUTOVSCROLL/AUTOHSCROLL but i can't do that in GUICtrlCreateObj. Can anyone tell me where to insert it?

Link to comment
Share on other sites

bump?

The example in the helpfile for GUICtrlCreateObj () shows how to create an embedded browser.

The example for _IECreateEmbedded (currently in the .doc file in the IE.au3 T2,0 base post) shows you how to do it with GUICtrlCreateObj () and some IE.au3 functions (including COM error handling).

What isn't working?

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

Link to comment
Share on other sites

it's working. I just need a way to add scrollbars to the embeded window. Everything else works fine

That's odd. The question is usually how to get rid if them.

Take a look at

$oIE.document.body.scroll = "yes"

Valid valies are yes, no, auto

Dale

Edit: broken code tag

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

Link to comment
Share on other sites

#Include <IE.au3>
#Include <GUIConstants.au3>
$oIE = _IEcreateEmbedded ()
$oIE.document.body.scroll = "yes"
GUICreate("Gaia Suite web browser", 940, 690, 50, 6)
GUICtrlCreateObj($oIE, 0, 0, 957, 550)
$Input1 = GUICtrlCreateInput("http://", 192, 554, 505, 21, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("Gaia fishing", 10, 626, 129, 33)
$Button2 = GUICtrlCreateButton("Gaia Towns", 139, 626, 153, 33)
$Button3 = GUICtrlCreateButton("Gaia Main", 442, 626, 153, 33)
$Button4 = GUICtrlCreateButton("Go", 712, 554, 57, 25)
$button5 = GUICtrlCreatebutton("Marketplace", 290, 626, 153, 33)
$button6 = GUIctrlcreatebutton("Forum", 593, 626, 153, 33)
$backbt1 = GUICtrlcreatebutton("Back", 746, 626, 153, 33)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $button1
        $oIE.navigate ("http://gaiaonline.com/games/launch.php?g=fishing")
    Case $msg = $Button2
        $oIE.navigate ("http://gaiaonline.com/games/launch.php?g=towns")
    Case $msg = $Button3
        $oIE.navigate("http://gaiaonline.com")
    Case $msg = $button4
        $oIE.navigate (GUICtrlRead($input1))
    Case $msg = $button5
        $oIE.navigate ("http://gaiaonline.com/gaia/vend.php?")
    Case $msg = $button6
        $oIE.navigate ("http://gaiaonline.com/forum/")
    Case $msg = $backbt1
        $oIE.GoBack
EndSelect
WEnd

Exit

Link to comment
Share on other sites

that doesen't work. I put it right before my GUICreate(). is that wrong?

That command controls the webbrowser, not the GUI -- it has to go after your GUICtrlCreateObj when the webbrowser instance is available - and it actually needs to go after your document navigation in that control is complete so that the body element is available.

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

Link to comment
Share on other sites

Ok, i can live withthout the scrollbars, but now i have another problem. When i click the buttons, instead of re-navigating to the site, it reloads the page from my cache, exactly how it was when i open the program. The code hasn't changed since above so thats the code. Is there anyway to make it re-connect instead of running of the saved page in my cache?

EDIT: spelling error

Edited by codemyster
Link to comment
Share on other sites

Ok, i can live withthout the scrollbars, but now i have another problem. When i click the buttons, instead of re-navigating to the site, it reloads the page from my cache, exactly how it was when i open the program. The code hasn't changed since above so thats the code. Is there anyway to make it re-connect instead of running of the saved page in my cache?

EDIT: spelling error

Look at _IEAction, refresh

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...