JRowe Posted October 17, 2009 Share Posted October 17, 2009 (edited) I was wondering if someone could test this and maybe make it work for them. I've tried everything I know how to make it work and it doesn't, so I figured that before I try to recreate the functionality with DllCall, I'd ask for help.Here's the Smilex.ocx, which is an activex wrapper for the SMILE library. It's another AI rabbithole I'm checking out that has to do with Bayesian Networks and Influence Diagrams.The documentation is here.I've attempted to load Animal.dsl file into the system. I used the ObjEvent error handler, it's returning Catatstrophic Failure, which is basically a codeword for "The programmer didn't really specify whatever is happening, so I'm gonna freak out and crash."$oMyError = ObjEvent("AutoIt.Error","MyErrFunc") Global $g_eventerror = 0 $Smilex = ObjCreate("SMILEX.SmileXCtrl.1") if not IsObj($Smilex) then Msgbox(0,"Error","$Smilex is not an Object.") else Msgbox(0,"Error","Successfully created Object $Smilex") endif $file = "c:/test/Animals.dsl" $Result = $Smilex.ReadFile($file) Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) $g_eventerror = 1 ; something to check for when this function returns EndfuncSomething just occured to me. Could it be expecting an ascii string instead of unicode?Nevermind. I'm just gonna use dllcall or a plugin, there's only 22 functions to interface with. Edited October 17, 2009 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] 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