Sign in to follow this  
Followers 0
edgariyu

COM doubt

2 posts in this topic

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



Go to OBJ/COM Reference in the help file and look at the example for a COM Error Handler.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  
Followers 0