title: Expected end of line, etc. but found identifier
body: <p>Im trying to make a basic applescript that will tell an open application to press upload when a new tweet has been received. The script is giving me the error in the title and highlights the word 'button' when i compile it.
  Can anyone give me a heads up on where I've gone wrong?.</p>
  
  <p>repeat </p>
  
  <pre><code>tell application "safari"
      set URL of tab 1 of window 1 to "https://twitter.com/i/connect"
      delay 5
      if text of tab 1 of window 1 contains "1 new interaction"
          tell application "Arduino" to activate 
          click button "Upload" of window 1
          delay 1
      end if
  end tell
  </code></pre>
  
  <p>end repeat</p>