Jump to content
Sign in to follow this  

Event handler for XMLHTTP

Recommended Posts



I'm having trouble setting up the event handler for Microsoft.XMLHTTP. I read some sugestions on the forum 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


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


Func MyErrFunc()


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)



Any help is appreciated! This one is killing me!

Thanks :D

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.