title: Open URL and Activate Google Chrome via Applescript
body: <p>I have the following AppleScript that I wrote many years ago. I use this code to program buttons on my Harmony One universal remote to access online video services via Google Chrome. The code is not working. Google Chrome doesn't launch. I am running the code via RemoteBuddy. The code complies fine, but does not work.</p>
  
  <p>Anyone have any thoughts on what might be the problem, or how I can improve the script to make it work?</p>
  
  <pre><code>tell application "System Events" to set open_applications to (name of everyprocess)
  if (open_applications contains "Google Chrome") is true then
          tell application "Google Chrome" to quit
  else
          tell application "Google Chrome"
                  activate
                  open location "http://xfinitytv.comcast.net"
          end tell
          delay 1
          tell application "Google Chrome" to activate
  end if
  </code></pre>