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.
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:
|q 0x5||Q, don't eat, wait until released|
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.
Begins with @. Undocumented.
Begins with $. Undocumented.
Begins with ^. Then follows trigger manager function name and optionally more data that is defined by the trigger.
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 //.