title: Tick a checkbox only if it's not selected
body: <p>When UI Scripting in Applescript, you might want to tick a checkbox:</p>
  
  <pre><code>tell application "System Events"
    tell process "Example Process"
      click checkbox "Example Checkbox" of sheet 1 of window 1
    end tell
  end tell
  </code></pre>
  
  <p>This has a problem. If the example checkbox is already ticked, you actually un-tick the box. How can you "tick the checkbox only if it's not already ticked"?</p>