Jump to content

error: The requested action with this object has failed.?


Recommended Posts

Sorry if somebody can give me an idea where to look to find the possible problem in my code that gives an error:

1. #include <Array.au3>

2. dim $smt_request[64]

3. $Interpreter = $GProbe.Interpreter

4. $Interpreter.DebugOn

5. For $i = 0 To UBound($smt_request) - 1

6. $smt_request[$i] = Binary(Mod($i, 256))

7. Next

8. $Interpreter.SMTSend(0xFF00,$smt_request)

(line 8) error: The requested action with this object has failed.:

$Interpreter.SMTSend(0xFF00,$smt_request)

$Interpreter.SMTSend(0xFF00,$smt_request)^ ERROR

Thanks a lot.

Link to post
Share on other sites

You need a COM error handler that exactly tells you what happens. Something like:

; Error monitoring. This will trap all COM errors
Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc")

; Here goes your code

; User's COM error function. Will be called if COM error occurs
Func _ErrFunc()
    ; Do anything here.
    ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & _
            "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            "err.description is: " & @TAB & $oError.description & @CRLF & _
            "err.source is: " & @TAB & $oError.source & @CRLF & _
            "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF)
EndFunc   ;==>_ErrFunc
Run this code from SciTE and you will see the COM error messages in the output pane at the bottom. Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...