Using the AutoHotkey Hotstring() Function to Disable/Enable Hotstrings

While the Hotstring() Function Won’t Delete Hotstrings, It Can Toggle Them Off and On (Disable and Re-Enable)

Technically, once created, you can’t delete a Hotstring without exiting the script. However, you can disable and enable its function. When you disable a Hotstring using the Hotstring() function, it loses its power—similar to the effect of deleting it. But, since the disabled Hotstring still exists, you can bring it back to life by re-enabling it with the same Hotstring() function. Continue reading


Create Instant Hotstrings Using the AutoHotkey Hotstring() Function

While Building Temporary Hotstrings Using the AutoHotkey Hotstring() Function, We Learn DropDownList GUI Control Techniques

In Section 12, “Instant Hotkey GUI and Menu Section” of my book Jack’s Motley Assortment of AutoHotkey Tips, I go through a number of different techniques for keeping track of impromptu Hotkeys created with the InstantHotkey.ahk script (e.g. two-deep variables, associative arrays, etc). I thought of using that script as a model for this new InstantHotsting.ahk script. However, I might offer more learning points about other aspects of AutoHotkey if I start over with a new approach to this slightly varied problem.

Continue reading

Use the ListView GUI Control to Find Duplicate Entries in Data Table Files (AutoHotkey Legal ListView Part 2)

ListView Control Functions in a Loop Work Quickly Locate Repetitious Data

In my last blog, “ListView GUI Control for Viewing Data Table Files (AutoHotkey Legal ListView Part 1)“, I introduced using the ListView GUI control to view and correct a data table file—in this case, an INI file (LegalInput.ini). While sorting and viewing a data table in the ListView control offers many benefits, the most power comes from the 11 built-in functions available for manipulating the control and editing data.

All GUI controls (e.g. Edit, Text, MonthCal, etc.) offer options you can call with the initial Gui, Add command. ListView (and its sister TreeView) include similar options plus special functions for directly manipulating the control. Last time, we used LV_Add() to load the data table rows into the ListView control. This time, we use the LV_GetCount() function (the number of ListView rows) to limit the total number of iterations in a loop, LV_Modify() to focus on each table row in sequential order, and LV_GetText() to retrieve and store data in the row. Continue reading

Sorting Lists for Emoji Menus (AutoHotkey Sort Command Tip)

If a Menu Gets Too Long, the Sort Command Helps to Put Your Emoji List in Alphabetical Order

I received the following e-mail with regard to the blog “Put Your Emoji Hotstrings in a Pop-up Menu (AutoHotkey Trick)“:

Hello Jack,

Library Benefits

I enjoy your emails and have gotten a lot out of your books. I tried out EmojiMenu and it pops up but in Office 2013, (Word and Outlook), the emojis inserted are black, not color.

However, they are in color in Gmail as I compose this email. 🎂 Any idea why that is?

Also, some feedback/suggestions:

What are the categories available? From the column, I know about Animal and I guessed Food, but the others…? Is there a list of them?

A helpful improvement would be to alphabetize the lists. I don’t think to look for “catface” in the third column of Animal.

Thank you and best regards.

~Dale Continue reading

Put Your Emoji Hotstrings in a Pop-up Menu (AutoHotkey Trick)

Unless Endowed with a Photographic 📷 Memory, Who Can Memorize All the Activating Texts ✍ for Over 1000 Emoji 😀 Hotstrings? Use This Menu 🍱 Technique to Find and Insert Emojis 😀 Taken Directly from Your Hotstring Script

Who wouldn’t want all the emojis available at their fingertips? The last blog “Add Emoji Characters to Any Windows Document (AutoHotkey Hotstrings)” does just that. However, with the exception of the icons you use all the time, you won’t find remembering the activating strings easy. We need a quick lookup table to remind us of the activating strings for each image. Even better, why not a pop-up menu which both gives us the Hotstring keys and inserts the emoji? Fortunately, we can do this with a short AutoHotkey routine which searches the original EmojiInsert.ahk Hotstring file for our favorite characters.

Continue reading

More Hotstring Tricks Using the Input Command and a Data Table (AutoHotkey Legal Lingo Tips)

The AutoHotkey Input Command Makes It Easy to Use the LegalInput.ini Data Table in Multiple Ways

A few weeks back I demonstrated how to build an INI data table for driving AutoHotkey scripts. I used the INI file format (LegalInput.ini) because it includes one index for quickly looking up records. In the file, I created four-character codes for accessing records which include the English legal definition, the Latin term, and a description (if any).

Legal Input Lex Scripta

While essential to the AutoHotkey feature discussed last time, you’ll find the INI file structure incidental to the technique discussed in this blog. You can use an INI file either for its index or as a standard data table with no special capabilities. As demonstrated in this piece, you’ll find a number of different ways to take advantage of a data table—without requiring an INI file. An INI file gives you a convenient means for quickly accessing data, but (especially for short files) you’ll discover numerous other methods for extracting the information you want. Continue reading

The SynonymLookup.ahk Web Data-Driven App Fails (AutoHotkey Adjustments)

If the Source Code for a Web Page Changes, You May Need to Rewrite Your Web Data-Driven Script, Plus More AutoHotkey Tips

Because I do a great deal of writing, I’ve fallen in love with my SynonymLookup.ahk script which pops up a menu of alternative words for instant replacement in my documents. It’s pretty cool—even if I do say so myself. However, the other day, it ceased working.

After highlighting a redundant word, I initiated the Hotkey combination searching for an equivalent term. Nothing happened! No matter how much time passed, the script displayed nothing.

After investigating, I discovered that (exactly as I had contemplated in the first SynonymLookup.ahk had changed the formatting of the target page source code causing my Regular Expression (RegEx) to fail. The manufactured GoTo loop I used to increase the reliability of the Web download created an infinite loop.

I needed to adapt. Continue reading