Showing posts with label armchairlifehacker. Show all posts
Showing posts with label armchairlifehacker. Show all posts

15 December 2010

Geek corner: easily hyperlink text in any Windows program


Disclaimer: this is geeky, but you might find it useful.

Further disclaimer: this is a Windows-only solution. If you use a Mac, Linux box, or CR-48, find your own geek to solve this problem for you.

I don't know about you, but I'm constantly writing documents (emails, blog posts, word docs, etc.) using various rich text editors, and wanting to hyperlink text in those documents. Generally speaking, I have found this frequent use case to be too much of a pain in the ass. The steps are:

- Copy the URL you're linking to onto the clipboard (perhaps using Ctrl-C).
- Highlight the text you want to hyperlink.
- Find the "make this a hyperlink" button or feature in the program you happen to be using. Often this is a button that looks like a little chain, hiding in some toolbar somewhere. Perhaps there's a hotkey for it. Perhaps not.
- Wait for the "make this a hyperlink" dialog box to pop up. Make sure your focus is in the "URL" textbox in that dialog.
- Paste the URL into the textbox (perhaps using Ctrl-V).
- Press the "OK" button or hit Enter or whatever.
- Huzzah!

These are the steps I want:

- Copy the URL you're linking to onto the clipboard (perhaps using Ctrl-C).
- Highlight the text you want to hyperlink.
- Hit some hotkey to "paste" the URL onto the text in such a way as to make it a hyperlink.
- Huzzah!

(In fact, I sheepishly admit that I am always accidentally blowing away the text I wanted to turn into a link, and replacing it with the URL I wanted to link to, by forgetting that it doesn't work this way and hitting Ctrl-V. This means that I'm a dunderhead. Probably you're not.)

So, I did what every good programmer does when they want to solve a problem that can obviously be solved with code: I Googled to find out if anyone has already made a solution I can steal.

That failed. I did find an AutoHotkey script which does this trick when you're working in a raw HTML code editor, but I wanted something that will work in rich text editors (such as Gmail and Microsoft Office programs) as well as apps that actually have a "raw HTML" mode (such as Blogger and WordPress).

So I did what any good programmer does when Googling fails: break down and write some damn code. But not, as it turned out, very much code at all.

As it happened, I only needed a very tiny bit of glue to solve this problem, because others had gotten it nearly there. My final solution features a modified version of the AutoHotKey mentioned above (by Lowell Heddings) as well as a C# class to simplify interactions with the Windows clipboard (by Mike Stall). Beyond modding Lowell's script, all I actually had to write were two lines of C# code. FTW.

So anyway, now I can copy a URL to my clipboard, highlight a chunk of text in any HTML-aware Windows app, hit Ctrl-Alt-V, and turn that text into a hyperlink. Want the same capability? Here's what you do:

0) You'll need the .NET Framework 2.0 (or better) - you've probably got it already.
1) Download and install AutoHotKey.
2) Download LinkPaster.zip and unzip it to somewhere convenient, such as c:\Program Files.
3) In your LinkPaster folder (such as c:\Program Files\LinkPaster), double-click the InsertHyperlink.ahk file to install and run that AutoHotkey script.
4) Huzzah! You should be off to the races. Let me know if it doesn't work.

(BTW, this hack made me very happy while I was writing this post.)

Enjoy!

image by small world (rights)

13 August 2009

Armchair Lifehacker, Tip #2: Use Outlook like Gmail


So I had intended to make this "Armchair Lifehacker" thing a bit of a series, but then I forgot about it. Oh well, here's #2.

Perhaps, like me, you have no choice but to use Outlook for your work email communication. And perhaps, like me, you've been using Gmail for too long to go back to those old, clunky, self-defeating ways of filing and finding your email messages, like folder hierarchies.

So here's what I do: In Outlook, apart from the built-in ones (Inbox, Sent Mail, etc.), I have exactly one folder. I call it "Archive". (Yes, this is a bit confusing, becuase Outlook has its own, very different idea of "archive". So you might want to call it something else. "All Mail" would be a very Gmail-like choice.)

I practice, more or less, "Inbox Zero". I've been doing it for years, since long before it had a well-known name. So when I'm done with an email, I simply move it to my Archive folder, just like Gmail. Actually, before I do that, I might tag it with one or more Categories, which can be used in Outlook much like Labels in Gmail.

Then, when I want to find something, I never grope around in folders. Instead, I either look for it by Category (Outlook makes it easy to create Search Folders for Categories), or I use Google Desktop Search to find it instantly by typing in search terms. (I'm pretty sure that Windows Live Search, or whatever it's called, would suffice for this as well, but I've been using Google Desktop since long before MS came out with that, and haven't seen reason to switch. The built-in Outlook search capability is not useful, as anyone who's attempted to use it will attest.)

So anyway, that's my tip. Working this way makes me happy, and efficient. Possibly you'd like it too. Possibly not.

Now if only I had a way of getting the thing to properly thread conversations....

image by justingaynor (rights)

13 May 2009

Armchair Lifehacker, Tip #1: Inspirational passwords


Set your password to an acronym of the words of a favorite song, poem, prayer, or Bible verse. Mix up the case (upper/lower) a bit, and substitute some numbers or special characters to improve security. Benefits:

  • You end up with a very high-quality, hard-to-guess password.
  • Every time you type it, you're reminded of your song, poem, prayer, or scripture passage. It can even prompt you to brief prayer, in a very Brother Lawrence sort of way.

Example: Take the first verse of the well-loved Psalm 23:

The LORD is my shepherd; I shall not want

This becomes:

TLimsIsnw

Mix in a couple special characters:

TLim$I$nw

Voila - a fairly high-security, relatively easy to remember password...which also reminds you, every time you log in, that God's got your back.

Is good, no?

Image by Max (Tj) (rights)