Launches the macro on certain Quick Macros events. To assign this trigger, use the Properties dialog.
These events occur when QM starts, or when this QM macro list file is loaded or reloaded. If "Run synchronously" is checked, the function runs before any other macro can start. Functions that run synchronously must not contain wait commands, or QM will start with a delay. The _command variable is "1" on file change, "2" on QM startup, "3" on Windows startup (QM started with command line parameter S). These events can occur in this sequence: file loaded, QM started, Windows started.
There is another way that can be used to execute code or declare something when QM file is loaded. Create function init2 and place the code there. Function init2, if exists, is called even before "File loaded" triggers. It is called by the init function which is in the System folder and is called by QM to initialize QM extensions.
These events occur before QM exits, or before unloading or reloading this QM macro list file. The function runs synchronously and must end as soon as possible. The _command variable is "1" on file change, "2" on QM exit, "3" on Windows shutdown/restart/logoff. These events can occur in this sequence: Windows exits, QM exits, file unloading.
These events occur when you click the QM tray icon. These triggers disable default QM actions (show QM on left click, exit QM on Ctrl+left click, show menu on right click, disable/enable on middle click).
Used by user-defined triggers.
QM items that have this trigger are added to the QM menu bar, to the New menu, or to the tray menu.
Run when a QM item of type file link is launched. To run only for certain file types or files, specify a filename pattern. Can be used wildcard characters * (matches 0 or more characters) and ? (matches any single character). When you assign the trigger using the Properties dialog, it inserts code that provides file link item id and its file path.
Run when the user tries to end a thread in the Threads dialog or in the Running Items list. If the function returns 0, QM does not end the thread. The function, for example, can display a warning message box, or just silently deny the user's request, or correctly end the thread in a special way.
QM 2.2.0. Menu bar triggers launch the macro with two arguments, which are x and y coordinates where popup menu should be displayed. Menus are automatically displayed in right place.
QM 2.2.0. For macros and menus that have menu bar trigger, you can include & character in macro name. Then next character in menu bar will be underlined, and you can use the keyboard to show the menu.