Jump to content

Recommended Posts

Posted

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")

$oHTTP.Send()

When connecting speed is bad,my code is having a problem- Action Faild,and then Autoit collaps.

Is there any way to avoid this error?

Maybe using if @error?How to use it?

Posted

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")

$a=$oHTTP.Open("GET","http://kds.zj.com")

$oHTTP.Send()

$HTMLSource = $oHTTP.Responsetext

MsgBox(0,'',$HTMLSource)

Func MyErrFunc()

$HexNumber=hex($oMyError.number,8)

Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _

"Number is: " & $HexNumber & @CRLF & _

"Windescription is: " & $oMyError.windescription )

$_eventerror = 1

Endfunc

  • 3 weeks later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...