Thanks: Will do. PS, I have the list of parent objects from the Focused Object to the DeskTop getting listed now using the Accessible Object from the OnFocus Event in my little VBScript so it's a start. Rick USA ----- Original Message ----- From: Aaron Smith To: gw-scripting@gwmicro.com Sent: Monday, April 04, 2011 2:00 PM Subject: Re: How To Test Property Existance
You might look at the TreeView app which provides much of this information. Aaron On 4/4/2011 12:05 PM, RicksPlace wrote: Hi Guys: I am building a little vbscript. It will print the Properties of some objects that have focus much like the FocusWindowDetective. Some Properties are not valid for some objects throwing a runtime error. Is there a way to check the existance of a Property for a object prior to testing for It's contents? Does the TypeName VBS Method fulfill this purpose? I want to be able to hit a hot key at any focused point and have everything about that Focused object listed along with the Parent Chain of objects with all their details up to the Desktop or the main Overlap window. That means checking the Properties of all the related objects but some objects have more or less Properties and can throw an error if the Property is not valid for the Object in question. Thus, I want to check if a Property is valid for the object prior to testing it's contents to avoid the runtime error. In the GW VisualStudio script I see where Aaron used the TypeName Method to do some checking and I am wondering if that method will work for this purpose, if it returns Null for example. Thanks: Rick USA -- Aaron Smith Web Development * App Development * Product Support Specialist GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825 260-489-3671 * gwmicro.com To insure that you receive proper support, please include all past correspondence (where applicable), and any relevant information pertinent to your situation when submitting a problem report to the GW Micro Technical Support Team.