title: Terminal Command to open applications on login
body: <p>I have created an application for a prank on friends using AppleScript. The only thing I haven't managed to figure out is how to change the application contents to make the app automatically open at login. Is there a specific info.plist key I can use for this?</p>
  
  <p>If not how can I get the application to change computer settings, when run, to open the application on login?</p>
  
  <p>This is the script I put into an application. It is a <code>stay-open</code> app.</p>
  
  <pre><code>   property idleTime : 10 --seconds
  
  
  on run
  
      idle
  
  end run
  
  
  on idle
  
      tell application "Google Chrome"
          if it is not running then return idleTime
  
          tell window 1 to if it exists then ¬
              tell its active tab
                  set its URL to "chrome://newtab/"
              end tell
      end tell
  
      return idleTime
  
  end idle
  </code></pre>