Chefito

MSXML2.ServerXMLHTTP doesn´t work in OnReadyStateChange event

1 post in this topic

#1 ·  Posted (edited)

MSXML2.ServerXMLHTTP object don´t work in event OnReadyStateChange. 

I have searched in the forum and google and I have not found anything.
Anyone know how to make it work?

$oMSXML2 = ObjCreate("MSXML2.ServerXMLHTTP")
Local $oEventObject = ObjEvent($oMSXML2, "Event_") ; Start receiving Events.
$url = "https://www.autoitscript.com/site/" ;web example
With $oMSXML2
   .Open ("GET", $Url, True)
   .Send
EndWith

;~ While 1
;~    Sleep(50)
;~    If $oMSXML2.readystate=4 Then
;~    ConsoleWrite($oMSXML2.responseText & @CR)
;~    ExitLoop
;~    EndIf
;~ WEnd
While 1
   Sleep(50)
WEnd

Func Event_OnReadyStateChange()
   ConsoleWrite($oMSXML2.readystate)
EndFunc   ;==>HandleStateChange

Thank you very much.

Edited by Chefito

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