title: Bring application to front by ID
body: <p>I want to use AppleScript to bring an app to the front. If I run the following script</p>
  
  <pre><code>tell application "System Events"
    tell process id 916
      activate
    end tell
  end tell
  </code></pre>
  
  <p>the process doesn't come to front. Instead, only the active window of the currently front-most app loses focus, but that app stays in front.</p>
  
  <p>Is it even possible to do this with a process ID rather than an application name? I have tried this on Mac OS X 10.6.8 and 10.7.5.</p>
  
  <p>I am looking for a plain AppleScript solution. It should not use any shell commands or any other solution. I want to use the process ID number because I might have running multiple instances of the same application (in the same file location).</p>