Jump to content

COM doubt


 Share

Recommended Posts

Hi everyone.

I'm not really familiar with the COM use and i'm having some problems with the error debuging.

Mi question: is how could i detect and stop a query avoiding it to interrupt the rest of the program?

In this example i use the code to get a HTML, but the page is down and an error shows up when i try to make the send:

$WinHttpReq = ObjCreate("winhttp.winhttprequest.5.1")   ;Realizamos la peticion HTTP
$WinHttpReq.open("GET","http://www.firmy24.lubin.pl/kraj-es-show-Cenicienta")
$WinHttpReq.send()
$HTML = $WinHttpReq.ResponseText
ConsoleWrite("OK")

If i try to use this code inside a bucle, when arrives to this page, an error stops the program.

I just want to know if there is any code or function i could use to make my program skip the error. I tried using @error variable but it doesnt work, obviously because is not a function what fails.

Thanks for your help!

Link to comment
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
 Share

  • Recently Browsing   0 members

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