Two-Deep Variables for Tracking Data (AutoHotkey Trick)

When You Find No Obvious Way to Link Specific Data to an Object or Another Value, You Might Try Saving It to a Variable within a Variable

Sometimes you encounter a scripting situation where saving data to just any random variable doesn’t do the job. While creating variables and storing values is simple enough, you may find it difficult to recall those values at the right time. It’s important to know you’re getting the right data when you want it. Maybe using the value of a variable as a variable name (two-deep) will give you what you need. Continue reading


Quick Fix for Inserting Color Data into Windows Paint (AutoHotkey Tip)

Auto-Fill Windows Program Data Fields Using RegEx—Plus, Alternative for Pop-up Messages

While the Coloretta Viva script copies pixel colors, transferring codes to Windows Paint gets awkward. This AutoHotkey data filling technique for multiple fields works in any Windows program. Plus, we look at another method for popping up user messages.

I recently highlighted the AutoHotkey Coloretta Viva color picking app at ComputorEdge Software Showcase. As a color matching tool, I consider the script an excellent start. However, I offer a couple of observations. Continue reading

Reset Hotkeys with Label Name Drop-Through Behavior (AutoHotkey Tip)

Sometimes Not Encapsulating Hotkeys with the Return Command Serves a Purpose

Last time, I discussed how to change the transparency level of any window under the mouse cursor with a scroll of the mouse wheel. The SeeThruWinWheel.ahk works great, but, if you increase the invisibility of the window too much, you might lose track of the window. We need a technique for instantly bringing a window instantly back into view. I did that with a trick from the blog “Understanding Label Names and Subroutines (Beginning AutoHotkey Tip).”

AutoHotkey Library Deal
AutoHotkey Library Deal

While studying the behavior of Label names in AutoHotkey scripts, I came up with the CheeseBurgerRecipe.ahk script which automatically moves to the next Hotkey recipe step with no additional code by dropping pass the next Label name directly into its subroutine. I didn’t expect to find another use for this technique so soon, but when I encountered the problem of losing track of invisible windows, this technique offered a quick fix. Continue reading

Stop Accidental Deletions with the BlockInput Command (AutoHotkey Tip—Part Two)

AutoHotkey BlockInput Command May Cause Stuck Keys! Fix It with the KeyWait Command

In the last blog, we dealt with the issue of setting the privilege level required to use the BlockInput command. In the BackupText.ahk and IncrementalSaveText.ahk scripts, the AutoHotkey command prevents user mouse/keyboard input while the script selects and copies text to the Windows Clipboard, but it doesn’t work without Administrator privileges. After raising the script to a higher level, we demonstrated how to use Windows Task Manager to bypass the User Account Control (UAC) warning window.

At the end of the blog, I mentioned an additional problem where BlockInput causes keys (usually one or more from the Hotkey combination) to stick in the down position. Here’s the trouble. Continue reading

Stop Accidental Deletions with the BlockInput Command (AutoHotkey Tip—Part One)

Ever Wonder Why You Might Want to Block Keyboard and Mouse Input? Here’s One Reason to Use the BlockInput AutoHotkey Command, Plus the Associated Problems

I added the BlockInput command to both the BackupText.ahk and IncrementalSaveText.ahk scripts. I did this to prevent the accidental deletion of the target text by an errant press of a key.

To check out whether the command operated or not, I added a time delay to the script looking for the halting of keyboard and mouse action with BlockInput On. It didn’t work! My experiment demonstrated that the BlockInput command blocked nothing. There’s a good reason for this. Continue reading

Why AutoHotkey for Internet Trolls?

If You Plan on Being One of the Most Annoying People on the Web, Why Not Make It Easy on Yourself?

Note: If you’re an Internet troll, please don’t take offense at anything I say here. I’m merely showing how AutoHotkey makes trolling easier—as the free software does with anything you do on any Windows computer. Not that trolls need any help—other than psychological.

Internet trolls patrol cyberspace in an effort to right the wrongs perpetrated by unsuspecting users…or, maybe, they just want to make themselves feel better by making others feel worse. Whatever! The important point is that even Internet trolls can make good use of the free AutoHotkey tools available for their Windows computers.

TrollingRobotSome people think that AutoHotkey software should only be used for good, but if you like to harass people on the Web, right or wrong, AutoHotkey may be the tool for you. Internet trolls will be surprised at how easy AutoHotkey makes harassing people.

Disclaimer: Don’t blame AutoHotkey for this blog. Any tool can be used for good or evil. While a hammer can build a house, it can also tear it down.

(If you’re new to AutoHotkey, please see this “Introduction to AutoHotkey: A Review and Guide for Beginners.”) Continue reading

Too Much Planning Can Get in the Way of Good Scripting (AutoHotkey Quick Reference Part Five)

While Preplanning Script Writing Can Be Useful, Don’t Take It Too Seriously—Sometimes It Only Makes Sense to Rewrite Everything

The AutoHotkey script writing process rarely runs in a straight line. Often I start with a vague concept of what I want to do then start fiddling with the tools. Unlike when building a toolshed or bookcase, I rarely begin with a complete plan or blueprint for an AutoHotkey script. In fact, the code may undergo numerous changes during the debugging and problem-solving phases.

sarcastictweetsFor anyone who builds things, this approach may be disconcerting. Afterall, you can’t afford to build a house by trial-and-error. The cost of wasted materials would be prohibitive. Traditionally, we spend a great deal of time in the planning phase to make sure we avoid expensive mistakes. Even in computer programming, large projects come together much better after extensive planning. But with smaller projects such as AutoHotkey scripts the opposite may be true. I often start a script with only a vague idea of what I want to do. As I work on it, the possibilities expand and I often change course. Continue reading