Text-sensitive menu

Text-sensitive menus (TS menus) are used to execute commands when you type some text. Typical usage - text replacement.

 

A TS menu has no visible interface. When launched, it tracks text you type, and, when the typed text matches one of menu items, executes the associated command. To work, TS menu must have a trigger. Typically, it is a single key. The whole string that you must type to launch a menu item consists of the trigger and item's text.

 

Example:

/s/c
vol :"evolution"
ee :mac "Macro5"

 

This TS menu has two items (the "/s/c" only sets options). Assume, trigger is key E. When you type "evol", it pastes "evolution". That is, "e" is trigger for the TS menu, and "vol" is trigger for the command that follows the colon. Similarly, when you type "eee", runs macro "Macro5". Of course, you can use any other trigger. For example, if trigger is F12, the commands are executed when you press F12 and then type "vol" or "ee".

 

The text of a TS menu is a list of lines. A line has the following form:

 

text :statements

 

text is the text (in addition to the trigger) that you must type to execute statements. Can be used any characters, including spaces, tabs and line breaks. Can be used escape sequences (e.g., [] for new line). The separator between text and statements is single space and colon ( :). For example, if trigger is key E, and menu contains line mail  :"name@abc.com" (two spaces after "mail"), the command is executed when you type "email " (with space).

 

statements can be any commands that you can use in macros. To separate multiple statements, use semicolons.

 

Lines that begin with / are used to set options for following items (until next such line). To set options, you can use the Properties dialog. Options:

 

/s select text that triggered the command. Use Shift+Left keys. If command types or pastes text, selection is replaced.
/b erase text that triggered the command. Use Back key.
/i case insensitive. Note that this is applied only to item's text. To set 'case insensitive' option for trigger key (if it is typed), in Properties, put Shift button into third state.
/c if first character of trigger-text is uppercase, capitalize first character of first outp or key command. Note that it works with key "text", but not with key text.

 

The following example sets "select text", "case insensitive" and "capitalize" options for items that follow:

 

/s/i/c

 

You can also add and remove options for each item separately. To remove, use uppercase characters. In the following example, /C tells that "capitalize" option must not be used:

 

/Cpw1 :"password1"

 

To escape the / character at the beginning of item's text, use //.

 

Lines that don't have " :" and don't begin with / are ignored and can be used for comments.

 

A TS menu will not start if an alphanumeric character was typed previously in the same window. To start it anyway, wait 5 seconds, or click the mouse, or press Ctrl.

 

There are several events that deactivate the active TS menu (stop the text tracking): when typed text does not match any item, 5-second pause, mouse click, a nonprintable key, typing text in another window.

 

QM allows you to type one or several wrong characters and then use Backspace to correct them.

 

You can associate sounds with TS menu events: Options -> Sounds.

 

Does not work in DOS and console windows.