Modify

Opened 15 years ago

Closed 14 years ago

#1975 closed Bug (Fixed)

IE object does not recognized as valid object type

Reported by: MrCreatoR <mscreator@…> Owned by: Valik
Milestone: 3.3.7.18 Component: AutoIt
Version: 3.3.7.14 Severity: None
Keywords: IE COM Obj Cc:

Description

This bug was introduced in the latest betas (not sure in what particulary), on 3.3.7.5 it was fine.

The example is from the help file (_IECreateEmbedded):

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

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 640, 580, _
		(@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
		$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)

GUISetState()       ;Show GUI

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

; Waiting for user to close the window
While 1
	$msg = GUIGetMsg()
	Select
		Case $msg = $GUI_EVENT_CLOSE
			ExitLoop
		Case $msg = $GUI_Button_Home
			_IENavigate ($oIE, "http://www.autoitscript.com")
		Case $msg = $GUI_Button_Back
			_IEAction ($oIE, "back")
		Case $msg = $GUI_Button_Forward
			_IEAction ($oIE, "forward")
		Case $msg = $GUI_Button_Stop
			_IEAction ($oIE, "stop")
	EndSelect
WEnd

GUIDelete()

Exit

The error shown in the console:

--> IE.au3 V2.4-0 Error from function _IENavigate, $_IEStatus_InvalidObjectType

Attachments (0)

Change History (6)

comment:1 by DaleHohm, 15 years ago

This is another issue introduced with the change to the ObjName function and the return value for different objects. The embedded object used to return "IWebBrowser2" and it now returns "WebBrowser". So, the fix is in IE.au3, function IsObjType() change at line 3686:

from this

3685 Case "browser"
3686 If ($s_Name = "IWebBrowser2") Or ($s_Name = "IWebBrowser") Then $objectOK = True

to this

3685 Case "browser"
3686 If ($s_Name = "IWebBrowser2") Or ($s_Name = "IWebBrowser") Or ($s_Name = "WebBrowser") Then $objectOK = True

Dale

comment:2 by Jon, 15 years ago

Milestone: 3.3.7.15
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [6192] in version: 3.3.7.15

in reply to:  2 comment:3 by J-Paul Mesnage, 14 years ago

Milestone: 3.3.7.153.3.7.16
Resolution: Fixed
Status: closedreopened

Replying to Jon:

Fixed by revision [6192] in version: 3.3.7.15

This fix is not complete for _IELoad Line 535 must be modified too as suggested by Smoke_N

comment:4 by TicketCleanup, 14 years ago

Milestone: 3.3.7.16

Automatic ticket cleanup.

comment:6 by Valik, 14 years ago

Milestone: 3.3.7.18
Owner: changed from Jon to Valik
Resolution: Fixed
Status: reopenedclosed

Fixed by revision [6237] in version: 3.3.7.18

Modify Ticket

Action
as closed The owner will remain Valik.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.