Jump to content
Sign in to follow this  

How to disable "AutoIt Error" msgbox?

Recommended Posts

Hi there!

I'm using a script that keeps executing some Excel commands every minute in an Excel Sheet and some rare cases appears that message “The requested action with this object has failed.” (Without even touching the computer).

I guess that is a AutoIt + COM Object attachment issue, because it happens too while doing simple stuffs like reading/writing stuffs in the Cells and I don't If is possible to resolve it. Any comments?

So, my solution is:

Create another script that keep checking if my 'main script' is still running, If not, run it again.

For that, I need to disable the "AutoIt Error" messagebox that appears when happens this error.

Sorry If I couldn't explain properly my issue :mellow:


Share this post

Link to post
Share on other sites

I'm not that good with COM+, but I think implementing a custom COM Error Handler to gracefully catch the errors (write them to console instead?) would be the best approach. See an example of that in the help-file for function ObjEvent().

Share this post

Link to post
Share on other sites

Try to use

Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc")
<your code>
Func _ErrFunc()
;~  ConsoleWrite($oError.scriptline & ";" & $oError.source & ";" & $oError.description & @CRLF)

It should bypass the em.



Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...