Jump to content
Sign in to follow this  
edgariyu

COM doubt

Recommended Posts

edgariyu

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!

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.