zasxes Posted April 16, 2007 Share Posted April 16, 2007 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? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 16, 2007 Moderators Share Posted April 16, 2007 Add this toward the top of your script. _IEErrorHandlerRegister() Link to comment Share on other sites More sharing options...
zasxes Posted April 16, 2007 Author Share Posted April 16, 2007 perfect thanks!!! Link to comment Share on other sites More sharing options...
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