QM items

In QM, you can create items of several types:

 

Macros are used to safely execute macro commands. Only a single macro can run at a time. Red tray icon indicates that a macro is running. You can stop it manually (Pause key).

 

Functions usually are called from macros and functions. Functions also can be started as macros (not called from code) and run simultaneously with other running functions or macro.

 

You can place the same code in a macro or in a function. The main difference between macros an functions is for what purposes they usually are used. Macros are used to automate something. Usually they interact with other applications (send keys, run programs, etc). You will use macros in most cases. Functions is more advanced thing. They are mostly used for: a) To use the same code in multiple places just by calling the function; b) Unlike macros, multiple functions can run simultaneously, which is better in some cases. For example, use functions to execute background tasks and other tasks that run long time, often unattended, can run simultaneously, do not interfere with each other, like separate applications or services.

 

Pop-up menus are used to launch macros, files, and to execute any other commands.

 

Toolbars are used to launch macros, files, and to execute any other commands. Toolbars can be associated with windows (run automatically when window appears, and disappear when window closed), or free (once launched, exist all the time, on top of other windows).

 

Text-sensitive menus are used to execute commands when you type some text. When launched, tracks keys you type, and, if the typed text matches some label, executes that command. Text-sensitive menus are invisible.

 

Also, you can create folders (to store items) and member functions (for classes). Folders and member functions cannot have triggers.

 

Each item has a name, can have a trigger (event that launches it), text (sequence of commands) and several other properties. Trigger is optional.

 

To add new item, click the New button on the toolbar, or click the small arrow beside it and select a menu item. Then enter name in the small edit field that appears. To set trigger and other properties, use the Properties dialog (click the Properties button on the toolbar). To delete an item, right click it in the list of macros and click Delete in the menu, or click and press the Delete key.

 

QM 2.3.0. Added new item type - file link. File links are used to open text files in QM for viewing and editing. A file link is like a shortcut to the file. File contents is not stored in the QM macro list file. When you delete or rename the item, it does not affect the file. To create a file link, drag and drop a file from Windows Explorer to the list of macros in QM. Or open the file with QM, for example drag&drop on QM icon. Or use newitem. An item of this type can have a trigger or can be launched using the Run button. However by default it does nothing. To run the file, or do something else with it, create a function that does it and assign trigger 'QM events -> file link run'.