oleg Posted May 1, 2006 Share Posted May 1, 2006 (edited) Im trying out some Activex Zip objects and for most of them i have autoit crashing All operation is completed sucessfully by Object but when it finishes Autoit crashes ...Here is some code$oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Install a custom error handler $objZip = ObjCreate("ChilkatZip2.ChilkatZip2")$objZipEvent = ObjEvent($objZip,"Event")if Isobj($objZip) Then$objZip.UnlockComponent("AnythingWorksFor30DayTrial")$objZip.OpenZip("c:\test.zip")$objZip.Unzip("c:\")Else MsgBox(016,"Error","Unrar.Ocx Is Not Registered")EndIfFunc Event() ConsoleWrite($objZip.LastErrorText)EndFuncFunc MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "Windescription is: " & $oMyError.windescription ) SetError(1) ; something to check for when this function returns EndfuncAutoit Crash oleaut32.dll lib. Edited May 1, 2006 by oleg There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
cdkid Posted May 1, 2006 Share Posted May 1, 2006 Well, I see one problem with your Event function... try actually reading the helpfile on ObjEvent. AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
oleg Posted May 1, 2006 Author Share Posted May 1, 2006 Thanks Seems that i wasnt been handling events correctly I will try to figure it out There is a hex ( 31303030303030 ) reasons i love AutoIt ! Link to comment Share on other sites More sharing options...
oleg Posted May 1, 2006 Author Share Posted May 1, 2006 I modified the code but still its crashes .Im able to have the interface return correctly but still here is the code $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Install a custom error handler $objZip = ObjCreate("ChilkatZip2.ChilkatZip2")$objZipEvent = ObjEvent($objZip,"Event_","_IChilkatZip2Events")if Isobj($objZip) Then;$objZip.EnableEvents = "true"$objZip.UnlockComponent("AnythingWorksFor30DayTrial")$objZip.OpenZip("c:\test.zip")$objZip.Unzip("c:\")Else MsgBox(016,"Error","ChilkatZip Activex Is Not Registered")EndIfFunc Event_UnzipPercentDone($val1,$val2) ConsoleWrite($val1&@CRLF)EndFuncFunc Event_UnzipBegin() $objZip.NewZip MsgBox(0,"","Finished")EndFuncFunc MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "Windescription is: " & $oMyError.windescription ) SetError(1) ; something to check for when this function returns EndfuncWhat do you think ? There is a hex ( 31303030303030 ) reasons i love AutoIt ! 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