title: How to click button in AppleScript?
body: <p>Writing an AppleScript to open Image Capture and click the Import All button.  </p>
  
  <pre><code>tell application "Image Capture"
      activate
          tell application "System Events"
              tell process "Image Capture"
                  click button "Import All" of group 1 of splitter group 1 of window 1
              end tell
          end tell
  end tell
  </code></pre>
  
  <p>Image Capture opens but the script throws an error message saying it couldn't find the button "Import All".</p>
  
  <p>Have followed advice on other threads on how to check the location in Accessibility Inspector and how to translate that to AppleScript instructions.  </p>
  
  <p>What's missing?</p>