I spend a lot of time in the Keyboard Maestro wiki, looking up various things. I got tired of switching to my browser, setting up its window next to my editor window, finding the page I wanted, etc.
So I wrote a little macro to open various wiki sections in a window placed at the edge of my screen, sized to fit next to my KM editor window:
This way I can easily browse for what I need, then press Escape when done and the window vanishes, all without leaving the editor.
I use a Prompt With List action to easily select which area of the wiki I'd like to browse:
As shown in the first line, if I need a more fully-featured wiki experience, I can hold down the Option key to open the selection in my browser; without it, the pop-up appears. I set up that choice because the pop-up window isn't a web browser-there are no Back and Forward buttons, for instance. So if I need a deeper dive into the wiki, I hold down the Option key…but for simple lookups, I just double-click.
The macro is actually incredibly simple, at least until you get to the "display the page" portion of it. Here's the base macro:
The work is done in the left side of each entry in the Prompt With List action. By listing the trailing part of the URL (the part after the base defined in localTheURL), it's captured with my selection, making it easy to add to the base URL in the next step.
It's also really easy to add an additional section of the wiki: Find the extension part of the URL, then enter a new row with that to the left of the double underscore, and your label to the right.
The full URL is then either passed to the browser, or to the subroutine that creates the pop-up window (where you can specify the window size).
I made the web page section a subroutine because it can be used to open any URL you want—just pass the URL, and the desired window dimensions, and you're done. I put this code to use in many of my other macros. And this subroutine is not quite as simple as the main macro:
You can easily change the dimensions of the window, and there are instructions in the subroutine on how to change its alignment from right edge to midscreen. It's also possible to put it wherever you like by changing the values in the
<body data-kmhandleschemes... line.
I keep the main macro in a group that's only active when Keyboard Maestro is frontmost, and have it assigned to Control-K. (The subroutine is in a global folder, as I use it elsewhere.)
Not an overly complicated thing, but I use it every day, and love the fact that it lets me stay in the editor when I want to look something up.