bluerein Posted August 13, 2009 Posted August 13, 2009 Im having problems with error handling here heres the snippet from the full code $pids= _INetGetSource($site & "index.php?showtopic=" & $output[$i] & "/") if @error = 1 then _temps() $desc = _StringBetween($pids,'<meta name="description" content="',': " />') if @error = 1 then _temps() $new_desc1= StringReplace($desc[0],"&58;",":") now the problem is the last line , it errors now and again .. giving a message like "non-array value , $desc[0]" it shouldnt have even got that far with the error handling the code above loops 10 time btw and it doesnt do it all the time just now and again Thanks
WolfWorld Posted August 13, 2009 Posted August 13, 2009 Full script please. This is too confusing. Check with msgbox(0, 'Array Bound', UBound($desc)) Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
Authenticity Posted August 13, 2009 Posted August 13, 2009 You need to use the conditional instructions to check for condition. You don't have anything like try..catch in AutoIt because it's not necessary if you check for the correct condition before taking any action in code. Only COM error trapping is possible but your code has nothing to do with COM objects. >_
smbotans Posted August 20, 2009 Posted August 20, 2009 (edited) i have the same problem and worked out it is because of the way the tag is sometimes written: - <meta name="description" content="blah blah"> - <meta content="blah blah" name="description"> i have a script that uses an imbedded ie control and it used to work fine as it picked up tags in the first format ... i updated to ie8 and now the tags are displayed as per the second format ... not sure if the update is related but now i have the same problem so i need to find a way to deal with tags being displayed in either format ggrr!!!!! serge Edited August 20, 2009 by smbotans Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now