Sign in to follow this  
Followers 0
blkshadow82

IECreate is hanging all my scripts

8 posts in this topic

So I was working on a script and testing it when all of a sudden the IEcreate stopped creating a new instance of IE.  Also, When I went to the windows bar at the bottom right to exit out of the script it doesn't allow me to exit it just stays there. That forced me to quit Autoit process.  I thought maybe it was just an error in my script but then I tried a few other scripts which I knew were working and used the IECreate, same result. I restarted, I've uninstalled ran ccleaner then reinstalled Autoit and still no luck.

Any ideas? This is really going to make my life hell if I cannot figure this out. I use autoit to do almost every task at my job.

Thanks in advance.

Share this post


Link to post
Share on other sites



Yes, one idea would be to post your script rather than asking us to guess ;)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Like I said it is now happening on all of my scripts not just one.  So I think it has to do with Autoit itself.  I can post it but i don't think that will do much good Since it is ALL of them.

Share this post


Link to post
Share on other sites

You need to give us MUCH more information!

Which version of Windows? 32/64 bit?

Which IE? 32/64 bit?

Which AutoIt version?

What did you change on your system?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#include <Excel.au3>
#include <IE.au3> 
#include <Array.au3>
#Include<windowsconstants.au3>
#include <GUIConstantsEx.au3> 
#include <String.au3>

; Register a customer error handler
_IEErrorHandlerRegister("MyErrFunc")
; Do something
; Deregister the customer error handler
_IEErrorHandlerDeRegister()
; Do something else
; Register the default IE.au3 COM Error Handler
_IEErrorHandlerRegister()
; Do more work



Func MyErrFunc()
    ; Important: the error object variable MUST be named $oIEErrorHandler
    Local $ErrorScriptline = $oIEErrorHandler.scriptline
    Local $ErrorNumber = $oIEErrorHandler.number
    Local $ErrorNumberHex = Hex($oIEErrorHandler.number, 8)
    Local $ErrorDescription = StringStripWS($oIEErrorHandler.description, 2)
    Local $ErrorWinDescription = StringStripWS($oIEErrorHandler.WinDescription, 2)
    Local $ErrorSource = $oIEErrorHandler.Source
    Local $ErrorHelpFile = $oIEErrorHandler.HelpFile
    Local $ErrorHelpContext = $oIEErrorHandler.HelpContext
    Local $ErrorLastDllError = $oIEErrorHandler.LastDllError
    Local $ErrorOutput = ""
    $ErrorOutput &= "--> COM Error Encountered in " & @ScriptName & @CR
    $ErrorOutput &= "----> $ErrorScriptline = " & $ErrorScriptline & @CR
    $ErrorOutput &= "----> $ErrorNumberHex = " & $ErrorNumberHex & @CR
    $ErrorOutput &= "----> $ErrorNumber = " & $ErrorNumber & @CR
    $ErrorOutput &= "----> $ErrorWinDescription = " & $ErrorWinDescription & @CR
    $ErrorOutput &= "----> $ErrorDescription = " & $ErrorDescription & @CR
    $ErrorOutput &= "----> $ErrorSource = " & $ErrorSource & @CR
    $ErrorOutput &= "----> $ErrorHelpFile = " & $ErrorHelpFile & @CR
    $ErrorOutput &= "----> $ErrorHelpContext = " & $ErrorHelpContext & @CR
    $ErrorOutput &= "----> $ErrorLastDllError = " & $ErrorLastDllError
    MsgBox(0, "COM Error", $ErrorOutput)
    SetError(1)
    Return
EndFunc   ;==>MyErrFunc


$oExcel2 = @scriptdir & "\SD Tax.xlsx"
$oExcel = _ExcelBookOpen($oExcel2, 1)
;~ $oExcel3 = _ExcelBookNew()


$URL = "https://www.website.com"
$oIE = _IECreate($URL, 1, 1)
_IELoadWait ($oIE)

There's more to it but that Is where it hangs.

Share this post


Link to post
Share on other sites

Which version of Windows? 32/64 bit?  Windows 7 64 bit

Oh I think it might be my IE not Autoit. Hang on lemme try a few things I'll get back on this.

Share this post


Link to post
Share on other sites

Yup it was IE. Thank god.  Was weird that Autoit wasn't exiting out. May have just been stuck in the middle of the IE create function. Anyway. Problem solved.  I just uninstalled ie and reinstalled.

Share this post


Link to post
Share on other sites

Next time maybe you should check the running processes in task manager, I had a similar problem where IE process didnt fully close and was interrupting everything i was doing, make sure you add _IEQuit at the end of your script if you are done with the webpage

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0