Jump to content

_IENavigate doesn't work for me


Recommended Posts

Why this simple code doesn't work?

$Form1 = GUICreate("Center 1.0", 800, 600, 208, 111)

$browser=GuiCtrlCreateObj(_IECreateEmbedded(),0,0,800,600)

GUISetState(@SW_SHOW)

_IENavigate($browser,"http://dir.bg")

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case Else

EndSelect

WEnd

Exit

Edited by littleclown
Link to comment
Share on other sites

Your error is.......?

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

Try

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

$oIE = _IECreateEmbedded ()
$Form1 = GUICreate("Center 1.0", 800, 600, 208, 111)
$browser=GuiCtrlCreateObj($oIE,0,0,800,600)

GUISetState(@SW_SHOW)

_IENavigate($oIE,"http://dir.bg")

While 1
$msg = GuiGetMsg()

Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case Else

EndSelect
WEnd
Exit


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

So that tells you that that variable is not the correct type.

$browser = _IECreateEmbedded()
$ActiveX = GuiCtrlCreateObj($browser, 0, 0, 800, 600)

You need to be able to control the _IECreateEmbedded object....that's what you need to _IENavigate, not a GUI object.

Edit: Forgot to add you need to use _IENavigate($browser, $url)....like BD did.

Edited by mikehunt114
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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...