Jack’s New Beginner’s Guide to AutoHotkey

Completely Rewritten, Jack’s New Beginner’s Guide to AutoHotkey Includes Peeks at AutoHotkey Version 2.0

In July of 2012, I first starting digging into AutoHotkey. Originally, I put AutoHotkey in the class of “just another Windows scripting language.” But as I delved deeper and deeper, I soon realized that it had assumed the mantle of probably “the best utility software to ever DeprecatedRobothit Windows.” Not only does AutoHotkey immediately automate many simple Windows tasks, but it includes the powerful commands and functions you might find in any programming language—and much more. Six years later, nothing has changed my mind. In fact, as I learn more about AutoHotkey through my blogging and books, I get even more convinced that AutoHotkey offers “absolutely the best free Windows utility software ever!” Continue reading

Comparing Today’s AutoHotkey Version 1.1 and the Future Version 2.0 (Part 5—Replacing V1.1 gLabels with V2.0 GuiControl.OnEvent())

AutoHotkey Version 2.0 Drops the GUI gLabel in Favor of the Object OnEvent() Function

In AutoHotkey V1.1, the primary method for adding action to GUI pop-up windows employs the gLabel inserted into a GUI control’s options. As AutoHotkey moves to object-oriented programming in V2.0, the Gui.OnEvent() function replaces gLabels.

Launch Window V2In AutoHotkey V2.0, each GUI control responds to different Gui Events. For example, with the Gui Button control, you can register OnEvent() functions for Click, DoubleClick, Focus, and LoseFocus, while the Edit control directly supports Change. You register each type of initiating action you use with the OnEvent() function. In fact, you must register an event before AutoHotkey will respond. Continue reading

Comparing Today’s AutoHotkey Version 1.1 and the Future Version 2.0 (Part 3—RegExs for Converting to V2.0)

When and If the Time Comes, Regular Expressions (RegEx) Can Help with the Conversion Process from AutoHotkey V1.1 to V2.0

Identified by the (v1,v2) on the right side of the script name in the index, I’ve converted a few of the script on the Free AutoHotkey Script page from AutoHotkey V1.1 to the alpha version of V2.0. At first, I reworked a copy of a script one line at a time. Then I speeded up the process with a couple of Regular Expressions (RegEx) used in conjunction with Ryan’s RegEx Tester. While I continued working one line at a time, I could quickly reformat the entire line at once—mostly. Rather than tediously rewriting a command character by character, the RegEx provides a format which needs very little additional editing.

(I run AutoHotkey V1.1 and the yet-to-be-release V2.0 simultaneously using the techniques discussed in an earlier blog.)
Continue reading

Comparing Today’s AutoHotkey Version 1.1 and the Future Version 2.0 (Part 2—GUI Objects)

ComputorEdge E-Books

In AutoHotkey V2.0, GUI Pop-up Windows Turn into Objects, Plus Replacing the Lost V1.1 gLabel

I’ve converted a few of the simpler AutoHotkey scripts on the ComputorEdge Free AutoHotkey Script page (AddDate.ahk, EggTimer.ahk, and LaunchWindow.ahk) from V1.1 to the latest alpha version of V2.0. As I convert and post the new .ahk2 scripts, you can identify them by the (v1,v2) found to the right of the script name in the Download Index.

These V2.0 scripts won’t run with the current version of AutoHotkey (V1.1). I set up my system to run AutoHotkey 1.1 and AutoHotkey 2.0 simultaneously per my blog “How to Fool Around with the New AutoHotkey Version 2.0.” Continue reading

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

How to Fool Around with the New AutoHotkey Version 2.0

Test the Alpha Release of AutoHotkey V2.0 Without Losing All of Your Version 1.1 Apps

In my last blog, I said that you have plenty of time for making your AutoHotkey V2.0 decision. But, that doesn’t mean you can’t play with the current V2.0 version.

Natural curiosity forces many of us to explore the possibilities of the not-quite-ready-for-primetime 2.0 version of AutoHotkey. But, who wants the trouble of uninstalling (and reinstalling) AutoHotkey 1.1 or continually moving around the various versions of V2.0? Fortunately, you can set up both versions of AutoHotkey to coexist without interference. No need to continually move and/or rename of the main AutoHotkey file (AutoHotkey.exe). Using the approach offered here, you can simultaneously run your current V1.1 scripts while playing around with the future V2.0. 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