Jump to content

Recommended Posts

Posted

HiHo dear Community,

I'm currently NOT sitting at my home desktop. I'm quiet sure that at home to code posted below works fine, though at this computer it does not ;)...

If I un-comment one of the _IENavigate()'s the script results in an "$o_object.navigate($s_Url)^ ERROR" error... can anyone reproduce this... and by luck give me a hint how to solve this?

At home i've got ie7, one this box only ie6 is installed. Might that be the reason?

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

Global $width = 300
Global $height = 300
Global $oIE[2]

$gui = GUICreate("TestGUI", 640, 530, 0, 0, $WS_SYSMENU + $WS_CLIPCHILDREN)

$oIE[0] = _IECreateEmbedded()
GUICtrlCreateObj($oIE[0], 10, 110, 300, 300)
GUICtrlSetState(-1, $GUI_DISABLE)
_IEPropertySet($oIE[0], "height", $height)
_IEPropertySet($oIE[0], "width", $width)
$oIE[0] .document.body.background.resize
$oIE[0] .document.body.scroll = "no"
$oIE[0] .document.body.style.border = "0px"
;_IENavigate($oIE[0], "about:blank")

$oIE[1] = _IECreateEmbedded()
GUICtrlCreateObj($oIE[1], 330, 110, 300, 300)
GUICtrlSetState(-1, $GUI_DISABLE)
_IEPropertySet($oIE[1], "height", $height)
_IEPropertySet($oIE[1], "width", $width)
$oIE[1] .document.body.background.resize
$oIE[1] .document.body.scroll = "no"
$oIE[1] .document.body.style.border = "0px"
;_IENavigate($oIE[1], "about:blank")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then
        ExitLoop
    EndIf
WEnd

Cheers

Poly

This post will be edited again by Polyphem: Tomorrow, 11:55 AM
Posted

Found it, disabled the control before the navigate to blank... strange, at home it worked that way...

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

Global $width = 300
Global $height = 300
Global $oIE[2],$ctrloIE[2]

$gui = GUICreate("TestGUI", 640, 530, 0, 0, $WS_SYSMENU + $WS_CLIPCHILDREN)

$oIE[0] = _IECreateEmbedded()
$ctrloIE[0] = GUICtrlCreateObj($oIE[0], 10, 110, 300, 300)
_IENavigate($oIE[0], "about:blank")
_IEPropertySet($oIE[0], "height", $height)
_IEPropertySet($oIE[0], "width", $width)
$oIE[0].document.body.background.resize
$oIE[0].document.body.scroll = "no"
$oIE[0].document.body.style.border = "0px"
GUICtrlSetState($ctrloIE[0], $GUI_DISABLE)

$oIE[1] = _IECreateEmbedded()
$ctrloIE[1] = GUICtrlCreateObj($oIE[1], 330, 110, 300, 300)
_IENavigate($oIE[1], "about:blank")
_IEPropertySet($oIE[1], "height", $height)
_IEPropertySet($oIE[1], "width", $width)
$oIE[1].document.body.background.resize
$oIE[1].document.body.scroll = "no"
$oIE[1].document.body.style.border = "0px"
GUICtrlSetState($ctrloIE[1], $GUI_DISABLE)

_IEBodyWriteHTML ($oIE[0], "ctrl1")
_IEBodyWriteHTML ($oIE[1], "ctrl2")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then
        ExitLoop
    EndIf
WEnd
This post will be edited again by Polyphem: Tomorrow, 11:55 AM

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
×
×
  • Create New...