Sign in to follow this  
Followers 0
sqa

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

2 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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 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

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