title: How to browse Applescript object "DOM" for a given object?
body: <p>Given an object in Applescript (i.e. I have an Object Specifier to it), how do I find out what all accessible properties(?) that it has are?  I am not sure that <code>properties</code> is the right word here, and part of my question is what the correct vocabulary is; I will illustrate what I mean with the following example.</p>
  
  <p>For instance:</p>
  
  <p>Using the following Object Specifier, <code>tell application "System Events" to get process "TextEdit"</code>, I can access the <code>window</code> property(?) of it, such as <code>tell application "System Events" to get window of process "TextEdit"</code>. (Note that <code>window</code> is a list, apparently).</p>
  
  <p>What I want is to query the Object Specifier in some way that will show me which things (properties?), like <code>window</code>, are available in the object.  In Python, for example, this could be done using <code>dir(object_name)</code>.  Is there an equivalent in Applescript?</p>
  
  <p>I've tried the following two approaches but these, while providing useful lists, do not achieve the goal since they do not return <code>window</code> like desired in the example.</p>
  
  <p><code>tell application "System Events" to get properties of process "TextEdit"</code></p>
  
  <p><code>tell application "System Events" to get attributes of process "TextEdit"</code></p>
  
  <p>I am looking for something in a similar style which would return <code>window</code> and the other properties(?) like <code>window</code>.  How can I call such a query in Applescript code?</p>
  
  <p>Also, what precisely is the <code>window of process "TextEdit"</code> here?  Is it a <code>property</code>? An <code>attribute</code>? Something else?  Is there an easy way to answer that question within the Applescript Editor, such as perhaps by interpreting the blue-italics display of the returned <code>window</code> object? Does that appearance have significance for distinguishing between properties, attributes, etc?  (What does 'etc' include here, specifically and using correct vocabulary, is part of my question..)</p>