AutoHotKey – Easily Create An HTML Link

I’m huge fan of AutoHotKey which saves me a ton of time in not having to type repetitive keystrokes. Basically, it helps me be a better keyboard ninja.

Often for blog posts, I need to encapsulate a link with a HTML anchor tag. So that http://Mehul.net becomes http://Mehul.net

So I’ve hacked up the following AutoHotKey script which allows you to highlight a link and press Control+Shift+L and it automagically converts into an HTML anchor tag.

Copy this script into a autohotkey script. Load the script. Select an HTML link and press Control+Shift+L.

;————————————————————-
; Create A Link — Ctrl+Shift+L
;————————————————————-

^+l::
{
Send, ^c
Sleep 50
var=% “
” . clipboard . “
clipboard=% var
Send, ^v
Return
}

To learn more about AutoHotKey, check out these LifeHacker posts:

Turn Any Action into a Keyboard Shortcut

Hack Attack: Knock down repetitive email with AutoHotKey

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s