Expected end of line, etc., but identifier found

I am trying to make a basic applicator that will inform an open application to click on download when a new tweet is received. The script gives me an error in the header and highlights the word 'button' when I compile it. Can someone give me a head where I made a mistake?

repeat

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 

end repeat

+4
source share

All Articles