title: Why does PS Remote play Apple Script code only work occasionally
body: <p>I have very little programming knowledge but I am trying to make a code that follows a certain pattern of down arrows and returns in PS Remote play. I have written the following code and it works about a quarter of the time but other times it skips a step or two. Does anyone know what is going wrong with the code? Any help would be appreciated thanks. I am on macOS Big Sur</p>
  <pre><code>tell application &quot;RemotePlay&quot; 
  repeat 300 times
      activate
      delay 2
      tell application &quot;System Events&quot; to key code 125
      delay 2
      tell application &quot;System Events&quot; to key code 125
      delay 2
      tell application &quot;System Events&quot; to key code 36
      delay 2
      tell application &quot;System Events&quot; to key code 125
      delay 3
      tell application &quot;System Events&quot; to key code 36
      
      delay 60
  end repeat
  end tell
  </code></pre>