title: How to get the application name for a window reference
body: <p>When I get the reference to a window using for example:</p>
  <pre><code>tell application &quot;Safari&quot;
      set theWindow to first window
  end tell
  
  log(process(theWindow)) -- # Safari
  
  tell application &quot;Terminal&quot;
      set theWindow to first window
  end tell
  
  log(process(theWindow)) -- # Terminal
  
  to process(theWindow)
      -- How to get app name from &quot;theWindow&quot;
  end process
  </code></pre>
  <p>From the variable <code>theWindow</code>, is it possible to extract the app name &quot;Safari&quot;? I need to know this information from a handler because the handler can accept window reference of other application as well.</p>