Use Automator to open a Flash website in Chrome

Not a day goes without some news story about Adobe Flash Player being a battery life killer, or the cause of browser/system crashes.

The latest news is about the fact that the access to your camera and microphone could be controlled by some malicious code running in a Flash website. According to the article that is caused by a bug in Flash Player.

I have not installed Flash on my Macs in a long time. I like Safari to be Flash free and let my computer run cool. For the few times when I need to access a website that make use of Flash I usually use Google Chrome.

Chrome is a very good browser and among other things it ships with a built-in Flash Player. Every time Chrome is updated, the new version contains an updated version of the Adobe player too. That’s handy, I don’t need to waste my time with the bizarre Adobe installers.

If I want to see a Flash website in Chrome, it is awkward to have to copy the URL, open Chrome, paste the address, press Enter. Yuk! Too long.

The Internet is packed with solutions to automate these steps. The solution that I have implemented comes from TUAW, and more specifically from the comment of a gentleman called Tim.

I’ll try to summarize his solution with some screenshots so that you can use it even if you’re not familiar with Automator, Services and Applescript.

  1. Open Automator and choose to create a Service type document (that’s the icon shaped like a cogwheel).
  2. Drag the Get Current Webpage from Safari and Run Applescript actions as shown in the screenshot,
  3. Open in Chrome service action

  4. In the Run Applescript action delete the script that is pre-populated by Automator and paste this one,

    on run {input, parameters}
    –display dialog (input as text)
    tell application “Google Chrome”
    get properties of window 1
    on error
    make new window
    end try
    tell window 1
    make new tab with properties {URL:(input as text)}
    end tell
    end tell
    end run

  5. Save the workflow and give it a name. For my example I called it Open in Chrome.

  6. Whenever you come across a website in Safari that requires Flash, just highlight the URL (or press Command + L) and then go to the services menu and select the service you’ve just created,
  7. Services menu Open in Chrome

  8. If Chrome is not already running, the script will launch it and open that Flash website in the second browser.