Comparing Today’s AutoHotkey Version 1.1 and the Future Version 2.0 (Part 1—Everything Functions)

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.

Continue reading


AutoHotkey Version 2.0—Should I Wait for It?

ComputorEdge E-Books

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.

Continue reading

More Windows Program Automation with the WinMenuSelectItem Command…Maybe (AutoHotkey Tip)

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!

Continue reading

The Main Window for Debugging AutoHotkey Scripts

How to View the Inner Workings and Hidden Mechanisms of Running AutoHotkey Scripts

AutoHotkey includes a tool called the Main Window which aids with the debugging process. It gives you a peek into various aspects of a running .ahk script:

  1. Most recently executed lines of code (ListLines command).
  2. Current variables and values (ListVars command).
  3. Active Hotkeys (ListHotkeys command).
  4. Keyboard activity (KeyHistory command).

Main Window Menu

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

More E-Book Bundles for Beginning and Intermediate AutoHotkey Users

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

JacksLibraryBookDeal250Every 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

Beginning Tips for Writing AutoHotkey Scripts

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

AutoHotkeyInsightsI’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

How AutoHotkey Reads Scripts (AutoHotkey Script Structure)

Understanding the Layout of an AutoHotkey Script Helps When Writing and Debugging Applications

The Problem with AutoHotkey Script Design

If you’re anything like me, then you probably jump straight into writing a script without reading the online documentation. Experienced programmers don’t have much problem with this, although even they occasionally find themselves scratching their heads about a particular piece of code which seemingly gets ignored by AutoHotkey. Continue reading