Trigger coding

To assign a trigger, you can either use the Properties dialog, or write encoded trigger string directly in the "Trigger" field on the toolbar. Below is described the format of encoded trigger strings for various types of triggers.



[mod]key[nextkey] [flags]


To specify trigger keys, are used QM key codes, as with the key command. The trigger string begins with optional modifier keys (C, S, A, W). Then follow one or two keys. Here you can also use virtual-key code in parentheses (must be number, not named constant). May be followed by space and flags (undocumented). Examples:

F9 F9
CSc Ctrl+Shift+C
Awe Alt+W+E
q 0x5 Q, don't eat, wait until released



#[#][mod]trigger[monitor|hittest] [flags]


Begins with # or ## (if double). Then follows optional modifier key codes (C, S, A). Then follows mouse trigger type: button (L, R, M, X1 or X2), or wheel direction (U or D), or screen edge number (1 to 12, clockwise, starting from top-left), or mouse movement direction (<, >, v, ^) and area number (1 - top or left, 2 - middle, 3 - bottom or right). Then optionally can follow monitor index (m and number 1 to 30, or only m for all monitors) or hit test code (h and number 1 to 30). May be followed by space and flags (undocumented). Examples:

#SR Shift+mouse right click
#CSD Ctrl+Shift+mouse wheel backward
##12 mouse movement to the top of the screen left edge, twice
#A>3 Alt+mouse movements right-left in the screen bottom area
#Lh2 0x1 Left click on window caption bar, don't eat



!triggertype"name" ["class"] ["childname"] ["childclass"] [style] [flags]


Begins with !. Then follows one or two letters: ca - created & active, cv - created & visible, a - activated, i - deactivated, v - visible, n - name changed, d - destroyed. Then follow one or more properties, and optionally flags (undocumented). All strings may contain escape sequences.

QM events

Begins with @. Undocumented.


Begins with $. Undocumented.

User-defined triggers

Begins with ^. Then follows trigger manager function name and optionally more data that is defined by the trigger.

Scope (only for key, mouse, window and text triggers)

If trigger is active only with single or several programs, after trigger code goes space, / and comma-delimited program names. If trigger is active with all programs except single or several programs, use \. Examples:

F12 /NOTEPAD trigger (hotkey F12) is valid only when active window belongs to NOTEPAD program
!ca"Open" \WINWORD,EXCEL trigger (created window "Open") valid only if the window does not belong to WINWORD or EXCEL program.


If the macro has a filter function, after trigger and programs goes / and filter function name. If trigger is not program-specific, filter function name goes after trigger code, space and //.