Making Desktop Webapps in Lion

“By the sainted mustache of Charles Foster Kane! Is it ever hot out there! I should write an app that keeps my city’s Current Weather data from Weather Underground within easy view at all times!”

“Holy rosemary vinaigrette! Today promises to be a huge day of news for Apple! I need to keep an eye on the news from all day today! But there’s no such app for that particular function, dagnabbit!”

“Jumping prophets of Newton Lower Falls! I’m getting far too much work done today! If I don’t find a way to distract myself, I’ll set unreasonably-high expectations of how much work I’ll be expected to accomplish on a Friday! If only there was a way to keep the Adorable Baby Polar Bears Live Webcam on my screen at all times!”

If you’re running Snow Leopard, you’re doomed to a dull life of unmet expectations. At best, you’re at the mercy of third-party developers and their infernal expectation to actually be paid for the apps they write.

In Lion? It’s DIY all the way. Automator — that singularly-awesome utility and infrastructure for automating damned-near any task — has a new feature that allows you to open any webpage inside a popup window. It’s so easy to use and it’s so goddamned useful that I’m amazed it’s not being promoted.

Here’s the incredibly complicated procedure for building an app that keeps a webpage open in a floating window:

1) Launch Automator.

2) Create a new App. (Or a Workflow. But an App will be cooler because you can have it in the Launchpad and start it up with a single click.)

3) Find and drag the “Get Specified URLs” action into your workflow. Just type the name into the search box until Automator finds it for you.

4) Paste in the URL of the site you want to view.

5) Find and drag the “Website Popup” action into the workflow. Choose a size for the window.

6) Save. Done.

Your workflow will look like this:

And when you run the app, it’ll put up a popup window that looks like this:

It’s a real app. It’ll stick around and float above your other windows until you dismiss it. You can move it into other Spaces and do pretty much whatever you want with it.

Did you notice the Really Clever Thing the “Website Popup” does? You can specify the size of the popup window and you can also choose how the app will identify itself to the website. In this example, the “User Agent” has been set to “iPhone.” Which means that thought this app was an iPhone web browser, and it automatically delivered the compact edition of the site.

It’s a little like the “Web Clippings” feature of Dashboard. Except this isn’t Dashboard, so there’s actually a chance in hell that you’ll ever use this thing.

The less-snarky thing to say is that this tool integrates into your mainstream Mac workspace far better, and its definable User Agent setting means that you can get it to work with the far more useful mobile editions of your most useful sites. It’s particularly keen for webcams. A friend recently set up a webcam for his pet birds. As a Dashboard Web Clipping, I’d have to carefully adjust the clip size and then I’d have to be in Dashboard to actually use it. I also couldn’t share this with other people. As an Automator app, it’s two quick steps, it runs alongside my other apps, and any time my friend wants to share the webcam with someone, he can just email them the app.

I think the Automator team at Apple has two mandates. The first one, of course, is to give every Mac user more power and control over how they do things, to save everybody time, and to restore the sort of volksprogramming experience that the Mac community lost when Apple terminated HyperCard.

But the self-appointed mandate is to keep emphasizing the truly cool things that you can do with this utility. With each new OS release, there comes at least one new Automator action that I play with for a while and then think “I can’t believe I built something that does this in that little amount of time!


“Is it possible to ask the user for a URL first?” asks @Thomas. That’s a nifty idea: instead of locking the app to just open, you could make a general-purpose “Open this URL as an iPhone webapp” utility.

And yes, of course, it’s easy-peasy. Instead of hard-coding the URL into the “Get Specified URLs” action, just add an action that asks for text input from the user and then feed that into an action that extracts a URL from any given text. That’ll dump the URL into the next function and Bob’s yer uncle. Viz:

The app will present the user with a standard dialog and then it’ll open the URL.

It’s yet another testament to how deep Automator goes. You rarely get tripped up by the problem “All of the basic functions are there but alas, there’s one critical element missing so no, you can’t do that.” And later on, it’s always easy to adapt or extend a workflow to accommodate a new idea or a change in needs.

Edited again:

A Trusted Advisor on Automator informs me of a cool Automator shortcut: if you drag a URL proxy (from your browser’s address bar) into the editing window Automator automatically builds you a “Get Specified URLs” action, using that URL.

97 Replies to “Making Desktop Webapps in Lion”

  1. Is there a way to go back and forth when viewing the webpages? I can’t seem to figure it out. And I have to reopen the web app again to go to the page I originally started at. Hopefully I am just missing something because this is a really cool and useful tool.

  2. Is there a way to disable the spinning gear in the menubar while the webapp is running? I love this tip, but I’m distracted by the constant rotating of the gear in my menubar! :) Thanks!

  3. Automator Novice Here:

    In terms of modifying the “All Purpose” variant, is there an Automator action that would pop-up a menu selection of, say, five or six often-used URLs?

  4. Andy: Great post been a reader since back when I used a Mac 128k. Quick question: where did the reference to Newton Lower Falls come from? Believe it or not, I actually live in the lovely hamlet of Newton Lower Falls!

  5. So how would you do this same idea but make it to where it does not float above all other windows?

  6. Nice idea! Small app files compared with fluid… but some sites I like to use as an Webapp do not work well. E.g. I cannot upload files.
    Also the float above all and no way to minimize the window makes it impossible to work with these “Webapps”. Bummer!

  7. I tried this for the first time last night. I thought it would be fun to setup a GMail iPad app. It worked fine but failed at the last hurdle in that I couldn’t scroll. Anyone have any ideas how to scroll iPad panels in an Automator app?

  8. Awesome, but this doesn’t really play all that well with Spaces; you can pin the app to space, but if you’re in another space and launch the app, despite having the “switch to space with open windows” enabled, you have to manually switch.

  9. Once I originally commented I clicked the -Notify me when new feedback are added- checkbox and now each time a remark is added I get four emails with the identical comment. Is there any manner you may remove me from that service? Thanks!

  10. Great idea – works well for some web based reports I access, but how can I make it reload the page periodically to refresh the report contents? I can’t see a way to manually refresh it within the window either :S

  11. Don’t work for google+, it told me my browser was not supported that i should download the newer version of Safari

  12. How do you delete an application created with automator? When I try to delete it, it tells me that the application is in use. This happens even when I close automator and the app.

  13. Two questions:
    – spinning cog appears on top bar, any way to not have that happen, it’s annoying to watch it spin
    – any way to have it not float above all windows as it does now?


Comments are closed.