Limit the Number of Substrings Delivered by the StrSplit() Function (AutoHotkey Quick Tip)

A New Parameter in the AutoHotkey StrSplit() Function Makes Selective Parsing Possible

robotparse.pngAt the same time as when we saw the release of the new Hotstring() function and other added Hotstring features (AutoHotkey version 1.1.28.00 – February 11, 2018), the powers-that-be made a significant change to the StrSplit() function. I don’t know if the idea grew from the need to parse Hotstrings or just happened to coincide with that release of AutoHotkey.

I discovered the new power when I ran into trouble working with the InstantHotstring.ahk script while using a Web address as replacement text. This useful new StrSplit() parameter (MaxParts) might save you from adding more code when you need to limit the number of produced pieces of text. (Don’t believe it when they say, “Parts is parts!”)

Continue reading

Use the FileSelectFile Command to Save Instant Hotstrings to an AutoHotkey File

After Taking the Time to Create Hotstrings with the InstantHotstring.ahk Script, It Only Makes Sense to Save the Code to an AutoHotkey File for Future Use

*          *          *

This blog is part of a series of articles discussing how to create instant Hotstrings using the Hotstring() function.

*          *          *

Ultimately, after writing and activating a number of Hotstrings with the InstantHotstrings.ahk script, we want to save them in an AutoHotkey file. That frees us from recreating the set of auto-replacements the next time we need them. Plus, rather than always loading the Hotstrings into the app, we can run the .ahk file directly with AutoHotkey. Continue reading

Adding Italics to Hotstrings in Word Processing Software (AutoHotkey Quick Tip)

If You Work with a Word Processing Program (Local or Web-Based) Which Supports Control Characters for Special Formatting, Then, Possibly, You Can Add Auto-Italics (or Bold, Underline, Etc.) to Your Autohotkey Hotstrings

A little while back, I wrote the blog “Italicize Your Hotstring Replacements with this Input Command Ploy (AutoHotkey Tip)” which demonstrated tricks for adding special features robotaicartoonfor both the Input command and Hotstrings. While clever solutions (possibly too clever), I now realized that in many programs (and Web apps), there might exist a much easier solution—a “duh” moment. Continue reading

Add Action to Your Hotstrings Using the New X Option (AutoHotkey Tip)

The Hotstring X Option Offers More Power by Running Commands, Functions, and Subroutines, Plus How to Temporarily Block External Hotstrings

In February of last year, the powers-that-be added a new Hotstring() function and a number of other Hotstring related features (See “New Flexible Hotstring Features Added to AutoHotkey.”) This major change added a host of new possibilities for creating and manipulating Hotstrings. The Hotstring() function acted as the impetus for my InstantHotstring.ahk script. In the process of writing that app, I developed a better understanding of how to enhance Hotstrings. Getting immediate feedback when implementing new replacements and options allowed me to quickly investigate many possibilities. Continue reading

Beginning Hotstring Tricks for Expanding Acronyms (AutoHotkey Tips)

Hotstring Techniques for Expanding Abbreviations Only When You Need Them, Plus How to Sound British…Sort Of

One benefit I’ve discovered when using my InstantHotstring.ahk script includes quickly checking the effects of the various Hotstring options. Without re-editing and reloading an AutoHotkey script, I can test the assorted options and see how they modify the behavior of each Hotstring. This helps me understand how to solve some Hotstring problems. Continue reading

Using GUI Checkbox Controls to Set Hotstring Options (AutoHotkey Technique)

AutoHotkey Hotstrings Use a String of Characters to Turn Options On and Off—GUI Checkbox Controls Offer a Visual Display for the Active Options along with a Method for Enabling/Disabling Each Feature

Previously (in “The Coming Instant Hotstring Script (AutoHotkey App)“), we reviewed the work still needed in the InstantHotstring.ahk script. This time we implement Hotstring options using the Hotstring() function.

Converting GUI (Graphical User Interface) Checkbox controls into Hotstring options codes (and back again) involves adept programming tricks. We use GUI windows and their controls to make applications user-friendly. People find it much easier to push discreet buttons and check separate boxes than work directly with often enigmatic programming codes. That means we must build a method for translating between the user-friendly input in a GUI window and the required code. Continue reading

Errata to the Motley Assortment of AutoHotkey Tips Book

If you’ve purchased (or plan to purchase) the Motley Assortment of AutoHotkey Tips book, you will want to see these comments/corrections from Rick Corbett:

Hi Jack,

I’m slowly ploughing my way through Motley AutoHotkey Tips – First Edition October 4 2018… and loving it. 😄

A couple of things… Continue reading

An AutoHotkey Tale

I recently received the following e-mail from Will Guest. Sharing it might inspire others to take a closer look at AutoHotkey. While Will implemented a serious solution to an expensive problem, you don’t need to work at his level to get tremendous benefit from AutoHotkey. Its simplicity makes it the choice for dealing with many Windows headaches—even for experienced programmers:

Hi, Jack,

I actually have another recent use for AHK, the technique(s) of which I’d gotten from one of your very helpful books. It’s a bit of a long story, but:

I’ve recently come back from almost two years in the Middle East (Abu Dhabi), where I was designing/ engineering/ installing/ and commissioning the AVCN (Audio Video Control Network) systems for a theme park project (Warner Bros. World, the ‘largest interior theme park on Earth’). We had a vendor installing a parkwide control and management system (Virtual Machines with a fault-tolerant Hypervisor) which was deployed on a per-node license basis. All good, but at least 18 of the nodes were all-in-one 7″ touch-panel PCs, which were used to turn On/ Off/ Set levels for the background music and lighting in the Food, Beverage, and Retail venues throughout the park. These touch panels were used about twenty minutes a day — if that much; so having a full license used for these rarely-used nodes was not the best (or fairest) plan. Plus, with the number of users that wanted to monitor the parkwide system, we were being put into a situation of having to buy additional (rarely used) licenses for a fairly large amount of money. Continue reading

The Coming Instant Hotstring Script (AutoHotkey App)

The InstantHotstrings.ahk Script Allows the Creation and Testing of Hotstrings

Library Benefits

January 5, 2019 Update: You can find the InstantHotstrings.ahk script at the ComputorEdge AutoHotkey Free Scripts page.

I started writing the InstantHotstrings.ahk script as a demonstration of the new Hotstring() function. I planned to keep it basic. (See the previous blogs, “Create Instant Hotstrings Using the AutoHotkey Hotstring() Function” and “Using the AutoHotkey Hotstring() Function to Disable/Enable Hotstrings.”) However, as often happens, the script ballooned into much more. While it continues to demonstrate various aspects of the Hotstring() function, it now includes a number of other features worth discussing (e.g GUI DropDownList, adding Hotstring options, saving and loading files).

I plan to post the current version of the app soon, but I don’t feel it’s quite ready. So, in this blog, I review the script’s features which provide topics for my future blogs. Although not my intention, you could call this a teaser of what’s yet-to-come. I should have the script ready for posting next week. I’ll publish a notice here when I’ve added it to the ComputorEdge Free AutoHotkey Scripts page. (I didn’t want you to think that during this holiday period I wasn’t working on something.)

January 5, 2019 Update: You can find the InstantHotstrings.ahk script at the ComputorEdge AutoHotkey Free Scripts page.

In addition to the two blogs mentioned above, I will write a series of pieces about the meat and potatoes in this new app:

  1. Add Hotstring options to the activated Hotstrings and the GUI DropDownBox control.
  2. Discuss the behavior of the various Hotstring options within the Hotstring() function.
  3. Look at considerations when using the X (execute) option in the InstantHotstring.ahk script.
  4. Save temporary Hotstrings to a .ahk file.
  5. Use the FileSelectFile command to save/load Hotstrings.

Continue reading