Modify

Opened 8 years ago

Closed 8 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 Changed 8 years ago by DaleHohm

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 follow-up: Changed 8 years ago by Jon

  • Milestone set to 3.3.7.15
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6192] in version: 3.3.7.15

comment:3 in reply to: ↑ 2 Changed 8 years ago by Jpm

  • Milestone changed from 3.3.7.15 to 3.3.7.16
  • Resolution Fixed deleted
  • Status changed from closed to reopened

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 Changed 8 years ago by TicketCleanup

  • Milestone 3.3.7.16 deleted

Automatic ticket cleanup.

comment:6 Changed 8 years ago by Valik

  • Milestone set to 3.3.7.18
  • Owner changed from Jon to Valik
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed by revision [6237] in version: 3.3.7.18

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.