Pages

Thursday, August 2, 2012

Scripting with autohotkey





Here's a tool that is easy to use yet extremely powerful. If you're an average computer user who just reads emails and edits an occasional word document, you can benefit from autohotkey. If you're a heavy user and it's not uncommon that you've more than 20 windows open, you can benefit even more from this scripting program.

Experts agree that Autohotkey is one of the best automation tools around. Perhaps you haven't heard of it before, because you've never seen any ads? Well, that's because it is open-source freeware! The benevolent geek who created this over the course of many years has made the source code as well as installer packages available on his site.

Functionality
Autohotkey is a powerful scripting language, really. With some patience, you can achieve everything from adjusting the volume of your computer's speakers to manipulating the registry and .INI-files. If you don't think that is very useful in daily computer chores, you're right. But here are a few things I actually do with autohotkey that save me a lot of time.

  1. keyboard abbreviations. I could have written that word by just typing "abbr" and the script would have expanded the text automatically. I use such keyboard shortcodes, that are recorded by autohotkey in a straightforward way, to quickly write my greetings under an email. "bye" turns into "warm regards, {name}" and so on. There is a short and very useful script to automatically add such shortcodes by hitting any chosen key combination (a real boon of autohotkey is its flexibility in using all kind of key combinations). That script then asks which shortcode you want to assign to the text you just typed. That rule is then appended to your script (which can grow to contain thousands of words, really) and the next time you type it the script will replace your shortcode with the wanted text. Brilliant.
  2. I have a few scripts laying on my desktop, waiting for me to drag a .zip file onto them. They then unzip it to a standard location, open an explorer window or some other programs depending on the contents on the zip, and show me a small message box cheering me up working on these files. You get the idea.
  3. Autohotkey can be used for autocorrecting common misspellings. There's a script available that checks for the 4,700 most common mistakes in the English langauge. Wonder if they'd have gotten this one.
  4. Mouseclicks and other interface actions. They can be recorded (remember the old macro-recorder for windows) or hand-written in the .ahk scripting language that really is easy to learn. I use it to perform certain mouseclicks in file dialog boxes, so that I sort my files in the right way. Of course, there are more invasive ways of doing this, such as a hack in the registry or the installation of countless windows tools. But this gentle recording of user interface actions is kinda neat.
  5. Autohotkey allows you to compile your scripts to .exe programs, so that they are portable and can be used on a computer without autohotkey installed. They can also be decompiled.
In conclusion, this is one of the best freeware tools of its kind, and I recommend it to everyone.











0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan