SeF Posted June 18, 2010 Share 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! Link to comment Share on other sites More sharing options...
l3ill Posted June 18, 2010 Share 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... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
KaFu Posted June 18, 2010 Share 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-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) 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 (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
UEZ Posted June 18, 2010 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now