Modify ↓
Opened 15 years ago
Closed 14 years ago
#1975 closed Bug (Fixed)
IE object does not recognized as valid object type
| Reported by: | 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 , 15 years ago
follow-up: 3 comment:2 by , 15 years ago
| Milestone: | → 3.3.7.15 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [6192] in version: 3.3.7.15
comment:3 by , 14 years ago
| Milestone: | 3.3.7.15 → 3.3.7.16 |
|---|---|
| Resolution: | Fixed |
| Status: | closed → reopened |
comment:6 by , 14 years ago
| Milestone: | → 3.3.7.18 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | reopened → closed |
Fixed by revision [6237] in version: 3.3.7.18
Note:
See TracTickets
for help on using tickets.

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