The AutoHotkey “For Key [, Value] in Expression” Loop for Associative Arrays

The Standard AutoHotkey Loop Command Works Great for Incremental Series, But the For Key [, Value] in Expression Object Loop Offers Unique Flexibility for Associative Arrays

In my last blog, I introduced associative arrays to the InstantHotkeyArrays.ahk script for solving the connection problem between the Instant Hotkey combination and the insertion text. It works brilliantly—although novice AutoHotkey users might experience a slight learning curve.

On the downside of associative arrays, the standard AutoHotkey Loop command may not provide the access you need to all of the array items. Fortunately, AutoHotkey provides a command specifically for use with Objects such as true arrays: For Key [, Value] in Expression.

Continue reading

Advertisements

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

Using Unique Icons for Specific Windows Shortcuts (AutoHotkey Menu Tip)

Draw Icons for AutoHotkey Menus Directly from Windows Shortcuts

I talked extensively in an earlier blog about adding icons to the menus in the QuickLinks.ahk script by using the FileGetShortcut command. This AutoHotkey command digs out data such as the target program from the shortcut. At the time, I didn’t attempt to use the captured icon data (OutIcon and OutIconNum—icon location and number respectively) because, in most cases, the variables came up blank. Even using the standard context menu creation option (New⇒Shortcut) often did not save the icon data for viewing with GetFileShortcut. Frankly, that would have made the process too easy.

Continue reading

Add Secret Windows Tools (God Mode) to QuickLinks Menu (AutoHotkey Tip)

This Windows Trick Works in Vista, Windows 7, 8, and 10

I first wrote about this hidden Windows technique years ago. You can find many references to it by searching the Web for the term “Windows God Mode” but I don’t know how many people make regular use of this feature. Continue reading

Spice Up AutoHotkey Menus with Icons (AutoHotkey Tip)

Using the Right Images Make Your AutoHotkey Menus Both Prettier and More Useful

It’s easy enough to put together a plain vanilla AutoHotkey pop-up menu without any icons. The sample QuickLinks script creates a menu from favorites Windows shortcuts in the QuickLinks folder. However, a stripped down menu looks pretty boring and makes individual items harder to find. Continue reading

Automatically Launch Apps at Windows Startup (AutoHotkey Tip)

Discover Autohotkey Tricks By Perusing Code In Other Scripts, Plus How to Load Any Windows Program at Startup

Many users find it easy to manually setup a program to auto-launch whenever they log onto Windows, but creating a shortcut and placing the new file into the Windows Startup folder requires a number of steps. With AutoHotkey, the same actions take just one command.

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