SeF 2 Posted June 18, 2010 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 Thanks! Share this post Link to post Share on other sites
l3ill 70 Posted June 18, 2010 you can disable the msgbox by placing a semicolon( ; ) in front of it. or you can post the code you are working with so we can see if there are any other strangenesses. My Contributions...SnippetBrowserNewSciTEPathFinderText File ManipulationFTP Connection Tester / INI File - Read, Write, Save & Load Example Share this post Link to post Share on other sites
KaFu 295 Posted June 18, 2010 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(). OS: Win10-1909 - 64bit - German, AutoIt Version: 3.3.14.5, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2019-Dec-21) BIC - Batch-Image-Cropper (2019-Dec-11) COP - Color Picker (2009-May-21) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2019-Dec-07) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Share this post Link to post Share on other sites
UEZ 1,278 Posted June 18, 2010 Try to use Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") ... <your code> ... Func _ErrFunc() ;~ ConsoleWrite($oError.scriptline & ";" & $oError.source & ";" & $oError.description & @CRLF) Return EndFunc It should bypass the em. BR, UEZ 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