Jump to content

Recommended Posts

Posted (edited)

When I want to test Example 1 of Function _IECreate (AutoIt Help File), I see that function _IECreate doesn't work in Windows 10.
Syntax Check (Ctrl+F5) gives no errors.

 

Example 1:

; Create a browser window and navigate to a website
#include <IE.au3>
Local $oIE = _IECreate("www.autoitscript.com")

 

The error I receive with F5 (Tools, Go) in SciTE:

1.jpg

Edited by dreivilo47
Problem solved
Posted

This command works fine in Windows 10, so the issue is local to your install. Post the output of this --

#include <MsgBoxConstants.au3>

Global $iEventError = 0 ; To be checked to know if COM error occurs. Must be reset after handling.

Local $oMyError = ObjEvent("AutoIt.Error", "ErrFunc") ; Install a custom error handler

Local $oObject = ObjCreate("InternetExplorer.Application")

ConsoleWrite('@error = ' & @error & @CRLF)

; This is a custom error handler
Func ErrFunc()
    $sHexNumber = Hex($oMyError.number, 8)
    MsgBox($MB_OK, "", "We intercepted a COM Error !" & @CRLF & _
            "Number is: " & $sHexNumber & @CRLF & _
            "WinDescription is: " & $oMyError.windescription)
    $iEventError = 1 ; Use to check when a COM Error occurs
EndFunc   ;==>ErrFunc

 

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...