Undutchable Posted September 8, 2009 Share Posted September 8, 2009 Guys, ..a bit offtopic because I'm using the object directly.. I'm having trouble setting up the event handler for Microsoft.XMLHTTP. I read your sugestions but i keep getting error (no such interface supported). ANYONE knows how to code the event handler for XMLHTTP? ->(configured by onreadystatechange - http://msdn.microsoft.com/en-us/library/ms762767(VS.85).aspx) Something like this: $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $objHTTP = ObjCreate("MSXML2.XmlHttp.6.0") ;or MSXML2.XmlHttp; or Microsoft.XMLHTTP ObjEvent($objHTTP,"Evt_") $objHTTP.open ("post", "some site", True) $objHTTP.onreadystatechange("onreadystatechange") ; also don't know how to reference my function here.. $objHTTP.send ("something") Func Evt_onreadystatechange() $o = @COM_EventObj msgbox (0,"msg", $o.state) Endfunc Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"COM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF) SetError(1) Endfunc Any help is appreciated! This one is killing me! Thanks 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