title: How do I get this apple script to pop up a dialog?
body: <p>The following apple script times out. How do I get it to work?</p>
  <p>This runs from inside a bash script and it's supposed to pop up a dialog. It works fine on one mac. But it times out on my computer. However, it start to work after I run the script once inside Apple's Script Editor. Also, if I run the Script Editor version before the script timeout, the dialog pops up! Is this a permissions issue? What is going on and how do I fix it?</p>
  <p>Bash Script:</p>
  <pre><code>osascript &lt;&lt;EOT
      tell app &quot;System Events&quot;
          text returned of (display dialog &quot;Enter value:&quot; default answer &quot;default&quot; buttons {&quot;OK&quot;} default button 1 with title &quot;Type A Value&quot;)
      end tell
  EOT
  </code></pre>
  <p>Error:</p>
  <pre><code>46:159: execution error: System Events got an error: AppleEvent timed out. (-1712)
  </code></pre>