Wednesday, January 12, 2011

How To Perform Nearly Any Task From Your Browser's Address Bar

By Whitson Gordon

How To Perform Nearly Any Task From Your Browser's Address Bar

How To Perform Nearly Any Task From Your Browser's Address Bar We use a lot of great webapps, but it takes a few clicks to perform even a simple task, like adding an event to your calendar. Here's how to collapse those step-by-step clicks into single commands for nearly any web application.

We've mentioned a few ways to perform tasks from your address bar before, but you can use one method to work with tons of different services, and set them up the same way, in one sit-down session.

We captured a demonstration of how this works out in actual time saved above, in video. But let's explain in a bit more depth why you'd want to do this, as well as how to set it up with some of our favorite productivity services.

Why Would I Want to Turn My Address Bar Into a Command Line?

The words "command line" have both positive and negative connotations. For power users, it's a tool capable of performing complicated tasks with a few keystrokes. For beginners, it can be confusing and actually waste time. However, many of the productivity services we use today, like Google Calendar, Remember the Milk, Evernote, or just plain Gmail, require quite a few clicks to set up something that seems, in your mind, like a one-line statement.

Take Google Calendar as an example. For most people, adding events is a multi-step process: first, you have to open up the webapp, then you have to find the date of the event, click on it, and then type in the name of your event, its time, and its location into a bunch of separate text boxes. Instead of going through all that, wouldn't it be faster to just type "dinner with mom at 7pm at Cameron's" in your address bar and be done with it?

That's the idea behind this system. By integrating all of your favorite services into your browser's address bar, you don't have to spend nearly as much time navigating their webapps. No matter what you want to do—whether it's add a task to your to-do list, add an event to your calendar, send a quick email, or even get driving directions—all you have to do is hit Ctrl+L and type in a few choice words. (Ctrl+L is the shortcut to highlight the text in your address bar. Memorize it and work it into your muscle memory; it'll be your best friend for this system. Also note that on a Mac, the shortcut is Command+L instead).

How it Works

How To Perform Nearly Any Task From Your Browser's Address Bar

The gears that make this machine turn are the keyword search tools built into both Firefox and Chrome. These allow you to use short keywords to search tons of different web sites, all from the address bar of your browser. However, you don't have to use them simply for search engines—as long as you have the right URL, you can use the address bar to do just about anything.

It works like this: when you enter text on a web application, the result is often the web page sending that text along to a server as part of a URL. A Google search for lifehacker android results in a URL of http://www.google.com/search?q=lifehacker+android. By finding the right URLs—for Google Calendar events, Google Maps directions, Twitter statuses, and more—we can use keywords in the address bar to submit text to any of those web sites.

Our video demonstration (embedded above) shows how to set up the keyword bookmarks below in Firefox or Chrome. Again, these examples are just meant to get you started. Check out your favorite services, click around, and see if you can't shortcut your text entry by a few clicks.

Useful Services to Set Up

The sky's the limit in terms of webapps you can manipulate with some URL tweaking, but here are a few examples using our favorite webapps. Below, we've provided suggested names and keywords for each service, though you can change those to whatever you want—the only thing you need to keep the same is the URL.

Since Firefox uses bookmarks as the source of these commands, you can actually download this file and import it into Firefox from the bookmark manager to automatically add the following commands.

Add Events to Google Calendar

How To Perform Nearly Any Task From Your Browser's Address Bar

Name: Add Calendar Event
Keyword: cal
URL: http://www.google.com/calendar/event?ctext=+%s+&action=TEMPLATE&pprop=HowCreated%3AQUICKADD

With this, you can add specify an event name, time, and place for a new Google Calendar event. So, if your keyword for this service is cal, you could just type cal Dinner with Mom and Dad at 6pm at Cameron's, and it would add the event to your calendar.

Get Directions with Google Maps

How To Perform Nearly Any Task From Your Browser's Address Bar

Name: Get Directions To
Keyword: maps
URL: http://maps.google.com/maps?f=q&source=s_q&hl=en&q=from+my+home+address+to+%s

For this URL, you'll want to replace from+my+home+address with your own home address. That way, you can just type maps 1 Main Street, Sim City to get directions from your house to 1 Main Street in the city of Sim City.

Alternatively, you could just use the URL http://maps.google.com/maps?f=q&source=s_q&hl=en&q=%s to specify the starting location as well. With this URL, you'll have to type maps from 2 main street to 1 main street. The upside of this is that you can get directions from any starting location, but it also takes longer to type out each time.

Send an Email to a Specific Contact

How To Perform Nearly Any Task From Your Browser's Address Bar

Name: Send Email to Tips@Lifehacker
Keyword: emtips
URL: mailto:tips@lifehacker.com?body=%s

This command lets you send an email to a specific person. So, you won't necessarily be able to use it to send all your emails, but if there are a few people you email especially often—like your boss, spouse, or other family member—this can be pretty handy. Just create a new one for each contact, replacing tips@lifehacker.com with their email address. Then, just type in the keyword and the body of your message in the address bar to send the message using your computer's default email program.

Note: If you want this to work with Gmail, you'll have to set Gmail as your default mail program, using either previously mentioned ChromeMailer or this method in Firefox.

Update Twitter

How To Perform Nearly Any Task From Your Browser's Address Bar

Name: Tweet
Keyword: tweet
URL: http://twitter.com/home?status=%s

This is simple; just type tweet I'm eating Cheerios to update your Twitter status to "I'm eating Cheerios".

Add a Task to Remember the Milk

How To Perform Nearly Any Task From Your Browser's Address Bar

Remember the Milk, our favorite to-do service, has a quick add URL, but it doesn't work quite as well as the above examples. So instead, we're going to use its handy Twitter integration, coupled with Twitter's quick status URL. For this to work, you'll need a Twitter account and you'll need to be following @rtm.

Name: Add Task to RTM
Keyword: rtm
URL: http://twitter.com/home?status=d+rtm+%s

This works just like the others. So, to add the task "Paper Due" on Thursday at 4pm, just type rtm paper due on thursday at 4pm. This will take you to Twitter, where you can just hit Tab and then Enter to send the task to Remember the Milk.

Create a New Note in Evernote

How To Perform Nearly Any Task From Your Browser's Address Bar

Universal capture and note-teaking webapp Evernote also has some pretty great Twitter integration, so we're going to use a similar URL as we did with Remember the Milk, using their @myEN account:

Name: Create Note
Keyword: en
URL: http://twitter.com/home?status=d+myen+%s

You use this the same way you would Remember the Milk. To quick add a new note, just type note Grocery List: Milk Eggs Chicken in your address bar, and that note will show up in Evernote.

Shorten URLs

How To Perform Nearly Any Task From Your Browser's Address Bar

We've shown you one way to shorten URLs from your address bar, but this method's even simpler. If you are a keyboard ninja, and don't want to click on a bookmarklet to shorten the URL of the page you're on, you can just type a service's bookmarklet code into a new search engine instead. For example, to shorten URLs with bit.ly from the Address bar, create this search engine:

Name: Shorten URL
Keyword: bit
URL:

 javascript:var%20d=document,w=window,enc=encodeURIComponent,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),s2=((s.toString()=='')?s:('%22'+enc(s)+'%22')),f='http://bit.ly/',l=d.location,p='?v=3&u='+enc(l.href)%20+'&s='+enc(d.title)+'%20'+s2,u=f+p;try{if(!/^(.*\.)?tumblrzzz[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a%20=function(){if(!w.open(u))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0) 

Unlike the others, you won't have to type anything except the keyword here. Just navigate to the page you want to shorten, type bit in the address bar, and hit enter. If you want to use a different URL shortener, just find their bookmarklet—most services have one—and copy the javascript from the bookmarklet into your custom search engine.

Set a Quick Alarm

How To Perform Nearly Any Task From Your Browser's Address Bar

Using previously mentioned CD, you can set an alarm with just a few keystrokes:

Name: Set Alarm
Keyword: alm
URL: cd.justinjc.com/%s

All you need to enter is the how much time you want to add to the stopwatch, or the time of day you want to countdown to. So, to start a timer for 3 hours, 15 minutes and 30 seconds, just type time 3h15m30s To count down to 5 pm, just type time 5p. It's much faster than adding an alarm to your phone, calendar, or alarm clock program.

Reminder: Google Is Pretty Smart On Its Own

How To Perform Nearly Any Task From Your Browser's Address Bar

While these are some more complicated options, it's also worth mentioning that Google can already give you smart results on its own pretty quickly. By just typing a few things in your address bar, you can get Weather, movie times, unit conversions, stock quotes, and even perform calculations. For the full list of what Google can do on its own (without custom search engines), check out their search tips page. Work these into your muscle memory, and you'll greatly increase the amount of information you can grab just by typing in your address bar.


We've listed quite a few examples here, but this is really just the tip of the iceberg. You can do this with nearly any site that allows you to enter text—you just need to find where in the resulting URL it puts that text, and replace it with the %s variable for your custom search engine. Got any other ideas of where this could be used? Share them with us in the comments.

Number of comments
  • Share this:

No comments:

Post a Comment

CrunchyTech

Blog Archive