Jump to content
Sign in to follow this  
zasxes

Check IE Object Properties

Recommended Posts

zasxes

I am trying to loop through all teh objects on a webpage and read in three properties. Based on the values of the properties I then do something. My problem is that the script ends in error if it hits an object that does not have one of the properties i am calling. Here is a snip of the code.

for $Obj In $Objs

with $Obj

$1 = .id

$2 = .maxLength

EndWith

Do stuff with the variables

How do I check if an object has given properties?

Share this post


Link to post
Share on other sites
big_daddy

Add this toward the top of your script.

_IEErrorHandlerRegister()

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.