Dealing with Hash Marks (#) in Hotstrings (AutoHotkey Quick Tip)

When Using the Pound Sign (#) in Hotstring Replacement Text, We Must Take Special Steps to Prevent It from Going Missing…I Mean Disappearing

RobotHashtagCartoonSome would say that we should call the # character an octothorpe. Others insist upon using it in place of the pound weight (# not £). You’ll commonly find it used as the number sign—as in apartment #205 or #2 pencil. Editors use # to tell whomever to add space between two words. In some computer languages, the # sign precedes comments. In Web URLs, the # indicates a “jump to” link within the same page. On Twitter, people insert # to precede topic references as a hashtag (#jellybeans). (People often use the term “hashtag” to show off their technological smarts—#sarcasm.) In AutoHotkey, we use the # symbol as the Hotkey modifying character for the Windows key (microsoft_key). Continue reading


Using Regular Expressions to Convert Most Formatted Dates into DateTime Stamps (AutoHotkey Tool)

AutoHotkey Offers Many Techniques for Converting the DateTime Stamp (yyyymmdd) into Formatted Dates, But What About Going in the Other Direction? Use RegEx to Identify Date Formats!

DateStampThe HowLongYearsMonthsDays.ahk function calculates the difference in years, months, and days between any two dates. To manually set the two dates, the script employs two DateTime GUI controls—input dates saved in the DateTime Stamp format (i.e. yyyymmdd) and the output in years, months and days. But wouldn’t you find it easier if you could highlight the dates in any document or Web page regardless of format, then use AutoHotkey to convert and copy the DateTime Stamps directly into the DateTime GUI controls? Continue reading

Counting Words with AutoHotkey (RegEx)

How You Count Words Depends Upon How You Define a Word

AutoHotkey RegExWhile working on my new book, I finished up a chapter where, in response to a reader’s question, I demonstrated how you can count commas in a document with both the StringReplace command and the RegExReplace() function. The StringReplace command responds to the UseErrorLevel parameter to save the count while the RegExReplace() function automatically counts the number of matches for saving in an OutputCountVar variable. That gave me the idea to write a word count script using RegExReplace(). Continue reading

A Simple AutoHotkey RegEx Trick to Print a List

Sometimes I Find It Quicker to Use Ryan’s RegEx Tester to Make a Clean List

While working on my current book, I found that I needed a printed list to keep track of my progress. In many circumstances, computer-based lists work fine but sometimes I want a piece of paper which I can markup with checks, arrows, and extraneous comments. The paper sits on my desk as a working tool—never hiding behind an open window on the computer screen. It seems archaic but, for me, it’s just easier. My problem involved printing a clean list of chapters without a load of extras. Continue reading

A New Hotstring Trick and Converting Dates in Documents into DateTime Stamps (Coming Soon!)

Making a List of Future Blogs While Sequestered

ProgrammingRobotRight now, the massive book of motley AutoHotkey tips consumes the vast majority of my time. Therefore, I have less blogging time. However, I don’t want my lack of blogs to make anyone think I sit idle. In the course of the current task at hand, I’ve accumulated even more topics which I need to blog about: 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