While AutoHotkey Does Not Include a Conditional Case Statement, You Can Build Your Own Using the Ternary Operator

Many programming languages include Case statements which act in a manner to similar a series of If…Else If…Else statements in an abbreviated form. The simplicity of the structure provides the primary benefit of offering a series of options in semi-list form Continue reading →

As We Await the Ultimate Release of AutoHotkey V2.0, Let’s Look at How Things Will Change

As I review the documentation for the alpha version of AutoHotkey V2.0, I can see that 95% of the code in a V1.1 script needs to change to run under the new version. AutoHotkey V2.0 offers a more consistent scripting environment, but you will experience a slight learning curve. Standard Hotstrings offer the only syntax which continues untouched. (Hotkey syntax also stays intact but you will need to update the commands within any Hotkey routines.) That means your AutoCorrect script will likely run fine under both versions of AutoHotkey—unless your Hotstrings execute custom actions.

To get ahead of the curve and give you a chance to make better-informed decisions about ever upgrading to V2.0 (once released), I offer this series of observations comparing V2.0 with V1.1. Digging into V2.0 requires a slightly different way of thinking yet it remains all AutoHotkey. You’ll find the overall script structure and how AutoHotkey processes a file unchanged. Any understanding you already possess about how AutoHotkey works will serve you well. In these blogs, I focus on converting from a language running with commands to one which uses corresponding functions.

As Signs of the Impending Release of AutoHotkey V2.0 Crop Up in the Online Documentation, Questions Arise About Our Legacy Scripts

I start by admitting that I have no special insight into AutoHotkey V2.0. I’ve had no contact with anyone who has the answers. I base all my thoughts on information freely available in the online documentation, forums, and other AutoHotkey sources. You might consider my words rank speculation—although drawn from my years of working with AutoHotkey V1.1. Since I written so many AutoHotkey books, you could even say that I hold a vested interest in the current version of AutoHotkey. In spite of all that, I offer this blog as an aid to current and future AutoHotkey users in their version decisions.

A while back I wrote a series of articles on using AutoHotkey for Windows program automation. They appeared in the old ComputorEdge Magazine. I used Windows 10 Paint as the example program demonstrating a number of approaches to program control. I temporarily put the articles in a makeshift PDF for artists and intend to include them in a future book—along with a couple of other unpublished Windows program automation articles. I extracted some of those columns from the original ComputorEdge issues and combined them into one free PDF download: AutoHotkey for Artist.pdf. The links may be obsolete, but the info is still good!

Open the Main Window by right-clicking on Windows System Tray icon of an active .ahk script and selecting Open from the top of the menu. The window pops open at the “Lines most recently executed” view. You can select the other three views plus “Refresh” from the View menu. Continue reading →

New E-Book Bundles for Making Your Journey into AutoHotkey Scripting Easier

Every programmer suffers moments where he or she achieves a breakthrough and the code actually works. Their first impulse—tell someone…anyone. “Look what I just did!” Alas, they find no one nearby to praise the accomplishment. At least, no one who either understands or cares about their success. Maybe that’s why I write about my AutoHotkey journeys. I need to tell someone when (ironically?) some code I wrote does what it’s supposed to do.Continue reading →

Exploring the Existential Mysteries of AutoHotkey Code and How It’s Often Misunderstood

I’ve just published my latest book, Beginning Tips for Writing AutoHotkey Script, which endeavors to clear up some of the mystery surrounding the way AutoHotkey works. You’ll find grasping how AutoHotkey processes AHK scripts a tremendous help. Quite a bit of the confusion encountered by novice AutoHotkey scriptwriters occurs through misunderstandings about the manner in which everything (life, the universe, and AutoHotkey scripts) fits together. I wrote the book with that muddiness in mind. Continue reading →