DLS Presents: URLauncher keyboard launcher for Windows (open-source)
Before Windows 7 came out, I used to love Launchy. I'm a keyboard-centric kind of guy, and a keyboard launcher fits in perfectly with my workflow. Launchy wasn't the only app I tried; I think I went through just about every major keyboard launcher for Windows and quite a few minor ones as well (including several AutoHotkey scripts).
And then Windows 7 came out, with its shiny new Start menu. No longer did I have to fire up Launchy to run a program quickly; in fact, the new Start menu was often faster than Launchy.
So, for a while, I was sated. I just hit Start, typed Excel, hit Enter, and everything just worked. Then, something started nagging at the back of my mind ... what about URLs? We're all about the Web these days, ... so what if I want to quickly launch a URL? What if I want to quickly search Google or IMDB, and I can't be bothered to Alt-Tab through 15 open windows until I hit my browser?
While I can use something like Start++, it's not always reliable, and it simply doesn't fit well with how my desktop is laid out. The text is too small, and my Start menu isn't in the normal position, so the whole experience is kind of awkward.
So, today, I have set out to make a small launcher of my own. I rather like the result, so I thought I'd share. I called it URLauncher, because it's aimed at getting to websites and executing searches quickly. You can download and use it for free, and the archive includes full source code.
- Go to any Web address using your default Web browser
- Save you typing the http://www and even the .com, .org, or .net
- Perform instant searches with Google, Wolfram Alpha, Wikipedia, and more
- Run any YubNub command instantly using the same mechanism
- Understand and calculate complex mathematical expressions (instant calculator)
- Execute user-defined aliases with the full power of AutoHotkey (for advanced users)
And it's a single file, so it's very portable. To see how it works and what it looks like, continue reading after the fold.
When you start URLauncher, you see nothing. Hit Ctrl+Space to see the command line. The most basic thing that URLauncher does is go to URLs. If you don't specify any top-level domain, it assumes that you mean .com. So, to go to Engadget, you simply type "engadget" and hit Enter:
If you wish to go to a website that is not a .com but is on another common TLD, such as .org, you can simply end the site's address with ".o," and URLauncher will expand it to .org. This works for the top three TLDs: .org, .net, and .com.
URLauncher is fairly simple, and inferring URLs is an error-prone operation. For example, URLauncher always assumes that you mean http://. So, if its guesswork is not working out for you, simply prefix your URL with a single dot, and URLauncher will take it literally.
If you prefix your string with a question mark, URLauncher will know that you're trying to execute a search operation. Several search engines are supported:
- ?b executes a Bing search. So, ?b Bill Clinton would search Bing for Bill Clinton.
- ?w executes a Wikipedia search.
- ?a accesses Wolfram Alpha with the arguments that you specify (as shown in the main screenshot for this post).
- ?o looks up any word on onelook.com's dictionary search.
- ?t runs a Twitter search.
- ?cf lets you search Compfight for images (it's a Flickr-based image search engine)
- ?dls is just an example for coders poking in the file; it's a Download Squad, site-specific search in Google. So, if you ever want to find a decent CD burning application (for example), just type ?dls cd burner.
There is actually one more search shortcut that I didn't mention, and it's the most powerful of all: YubNub. YubNub calls itself "a command line for the web," and indeed, it hosts an enormous number of other commands. So, if I've missed any important search engines and you don't want to add them yourself (or don't know how), you can probably just use YubNub for it. Simply prefix your YubNub command with ?y. Here, I'm using YubNub to execute an IMDB search:
Another handy feature (for me, at least) is the built-in calculator. It uses an AutoHotkey library for evaluating mathematical expressions; it's called Monster, and it was developed by AHK master-coder Laszlo. What you see below is just a fraction of what it can do, but it's probably all I will use it for, personally.
There's one last nugget for the coders in the audience: URLauncher supports aliases. They are not externally configured, but if you rummage through the source code a little bit, you can see exactly where and how to add them; I've left my samples in the file. Aliases are "nicknames" for commands and operations, such as "dls" for accessing Download Squad immediately. Since they are an intrinsic part of the script, you can create complex aliases that utilize the full power of AutoHotkey. The flip-side, of course, is that non-coders can't really create them. But again, with Windows 7's Start menu, I don't really see a need for many aliases. I just put them in for fun.
One thing that I should note is that URLauncher is not configurable in any way; it's a small utility that is meant to do just a few simple operations. There's no auto-complete or command history, either. If it proves popular, I might make it configurable and add some bells and whistles; it all depends on you guys. You are free to modify the sources and release them on, as long as you maintain attribution.
That's it! Enjoy using the tool, and here's the download link again. Let me know what you think in the comments!