title: Using AppleScript how do I click a button in a dialog within a window that has no name/title?
body: <p>I'm trying to write an AppleScript that will empty the cache of Twitter for Mac and then restart the app. The problem I'm running into is that the confirmation dialog doesn't have a name (the title bar is empty) so I'm lost as to how I target the button with no context. Here's what I have so far:</p>
  
  <pre><code>tell application "Twitter"
     activate
  end tell
  tell application "System Events"
     tell process "Twitter"
        tell menu bar 1
           tell menu bar item "Twitter"
              tell menu "Twitter"
                 click menu item "Empty Cache"
              end tell
           end tell
        end tell
     end tell
  end tell
  tell application "System Events"
     click button "Empty Cache" of window "Empty Cache?"
  end tell
  tell application "Twitter"
     quit
  end tell
  tell application "Twitter"
     activate
  end tell
  </code></pre>