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

Advertisements

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

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

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

New Flexible Hotstring Features Added to AutoHotkey

Last February, AutoHotkey Release 1.1.28.00 Included Important New Hotstring Capabilities

A few months back while working on my latest book, Jack’s Motley Assortment of AutoHotkey Tips, I encountered a new x option for Hotstrings. The x option enables the running of functions and commands rather than replacing text. This new feature surprised me since, in the past, a one-line Hotstring would only do text replacement.

I immediately recognized that this approach to one-line action Hotstrings could immediately shorten a long list of function Hotstrings. However, closer scrutiny of the new AutoHotkey release revealed further (and possibly more important) new Hotstring functionality. In addition to the x option, the February AutoHotkey release includes:

  1. A new Hotstring() function which adds dynamic capabilities to Hotstrings.
  2. A new method for creating function Hotstrings by defining the function immediately after the Hotstring(s).

Continue reading