August 10, 2012

Turn Hootsuite, Pandora, or Any Website Into an Application for Your OSX Dock

This is just a little trick that will let you treat websites a bit more like stand-alone applications. I wanted a way to quickly launch Hootsuite from my dock, but you could do this with any website. The result is an "application" that you can place anywhere, including the OSX dock. The website will launch in your browser of choice, just as if you had opened the bookmark manually.

I'm using Automator with a simple Applescript to do this, and then a little nip and tuck to pretty it up. If that sounds like Greek to you, don't worry. It's really simple.

Three of the icons in this screenshot are actually my own applications. One will launch Hootsuite, one Pandora, and that reclining gentleman launches a number of applications and webpages for me when I start my workday.

Before we start, you do have a few other (simpler) options. I could have changed the settings in my browser, so it would always open to automatically. However, I launch my browser a lot and I really don't want it to always open Hootsuite.

I could also drag the favicon from inside my browser to my desktop, and that would create a shortcut for me. But this shortcut can't be placed in the dock - and I don't want it cluttering up my desktop.

I've also got a great quick-dial extension for my browser that lets me get to my important bookmarks very quickly. Still - if you find yourself wanting a launcher icon for some website(s), then read on!

Let's finally get to it!

We're going to use Automator. Go ahead and launch that program. If you've never used it before, it should be sitting in your Applications folder. In the popup you are going to choose "Application" as your document type.

Now, you are looking at a blank Automator window. We need to add the action "Run AppleScript" to our workflow, which is easy to do. You see the searchbox? Type something like "applescript" in the searchbox and you will see this:

Now either double-click "Run AppleScript" or drag it over to the empty workspace area. You will now see this:

You're almost done. See the text for *Your script goes here*? Type this:

tell application "Google Chrome"
set theUrl to ""
open location theURL
end tell

Now you have this:

I'm using Chrome. You can use any browser. You can obviously change the URL also, to suit your needs. Now just do File > Save and save this application somewhere that you can find it. I recommend the Applications folder :)

You're done! 

You can now double-click your new application and the URL will launch. Drag it to the Dock or your desktop as you see fit. But you may notice that it is a little bit ugly.

Let's make it pretty.

First, find some icon or image you want to use for the new application. Try to find a square image. Using Google Image search is a snap and you don't much have to worry about copyright in this use case.

Now - open this icon image that you want to use into Preview. Press Command+A. Press Command+C. You've just selected and copied the image.

Next, open the info panel for your custom Application (right-click it, select "Get Info"). At the top of the panel is a tiny icon. Click this and it will highlight.

Now press Command+V. You've just pasted your image to the icon.

Close everything. Enjoy.

No comments:

Post a Comment