When you type or click an identifier (function, type, etc), and then press F1, QM shows help for it. The table shows where QM looks for help and where shows it.
| Identifier | On F1 |
|---|---|
| QM intrinsic function, type, etc | Opens its topic in QM Help. |
| User-defined function | Displays function's help section in the Tips pane. |
| API (dll function, type, constant, interface) |
|
| Class name | Looks for macro named "classname help" and displays it in Tips. If does not find, processes " /?" like with API. |
| Unknown (not currently declared) | Shows help search links in Tips. |
User-defined functions can contain comments at the beginning or below the function statement. It is function's help section.
function x y ;;this line is displayed in status bar These comments, including the 'function...' line, is function's help section. It ends with an empty line folowed by code. It is displayed in Tips when you click the function in code editor and press F1. The first line of comments is displayed in status bar and annotations (menu -> Help -> Annotations).
To add help section, you can use dialog: floating toolbar -> More Tools -> Function help editor.
In Tips can be displayed functions, macros and QM items of other types.
To show help, you can use F1 or function QmHelp.
The help section can contain tags and special lines. Use them to format the text when it is displayed in Tips.
| Special lines | Formatting |
|---|---|
EXAMPLE EXAMPLES |
Below this line, text is displayed as code (colored).
|
| See also: | In this line, function names enclosed in <> (like <Function>) make help links.
|
param - .... param (... param: param, ... |
Parameters are highlighted. |
Errors: ERRORS |
In or below this line, error constants (such as ERR_FAILED) make links to the error string.
|
UPPERCASE |
Bold text. For example, REMARKS is displayed Remarks. |
Returns: Errors: See also: Version: Added in: Author: |
If a line begins with this text, this text is italic. |
All except EXAMPLE(S) and See also: added in QM 2.3.3.
Tags can be used in help sections of user-defined functions and macros. To insert tags, you can use dialog: floating toolbar -> More Tools -> Function help editor.
QM 2.3.0. Tags also can be used with the out command, if the text begins with "<>". Also can be used with end, without "<>".
QM 2.3.3. Tags also can be used with OutStatusBar.
Tags also can be used in API help search links. To edit, right click in the Tips pane.
For most tags, the syntax is <tag>text</tag>, or <tag "attribute">text</tag>, or <tag "attribute /more info">text</tag>.
Attribute can contain QM escape sequences. For example, use two ' for ".
QM 2.3.3. Quotes are optional if attribute is single word.
<link "http://www.quickmacros.com">open web page</link> <link "mailto:abc@def.gh?subject=test%20qm%20links&body=test%0Aqm%0Alinks">create email</link> <link "notepad.exe">run file notepad.exe</link> <link "notepad.exe /$desktop$\test.txt">run notepad with command line parameters</link> <macro "MyMacro">run macro MyMacro</macro> <macro "MyMacro /abc">run macro MyMacro; the _command variable will contain "abc"</macro> <open "MyMacro">open MyMacro</open> <open "MyMacro /10">open MyMacro and go to position 10</open> <open "MyMacro /L10">open MyMacro and go to line 10 (1-based).</open> QM 2.3.2. <help "::/qm_help/IDH_QUICK.html">open a topic in QM Help</help> <help "qm2help.chm">open help file qm2help.chm</help> <help>MyFunction</help> QM 2.3.3. Shows function help. Read more below. <help "qm2help.chm::/qm_help/IDH_QUICK.html>main">open a topic in a help file, "main" window type</help> <tip "E_IF">display a tip from $qm$\tips.txt</tip> <tip "#MyMacro">display a macro or function (only help section) in tips</tip> <google ''quick macros''>Google search for 'quick macros'</google> QM 2.3.3. <google ''quick macros /&start=10&lr=lang_de''>Google search with parameters</google> QM 2.3.3.
Instead of <tag "attribute">text</tag> can be used <tag>text</tag>. Then text is used as attribute. Example:
<link>http://www.quickmacros.com</link>
QM 2.3.2. <tip>MyMacro</tip> can be used instead of <tip "#MyMacro">MyMacro</tip>.
QM 2.3.3. With <help> can be used any function or other identifier. Shows help as if you would press F1 in code editor. Examples: <help>MyFunction</help> <help>act</help> <help>SetTimer</help> <help>WM_TIMER</help> <help>str.replacerx</help> <help>My Macro</help>.
<b>bold</b> <i>italic</i> <u>underline</u>
<c "0x00ff00">green color</c>
<b><i><c "0xff">nested tags</c></i></b>
<z "0xff">red background (QM 2.3.3)</z>
<Z "0xff">red background full line(QM 2.3.3)</Z>
Instead of <c> can be used <color>.
QM 2.3.3. Supports nested tags of same type, eg <c 0x8000>green<c 0xff0000>blue</c>green</c>.
The word for which was pressed F1. Only in API help search links:
<keyword>
<macro "MyMacro /<keyword>">run macro MyMacro; the _command variable will contain the F1 word</macro>
Macro or function:
<code>
int i
for(i 0 5) out 1
</code>
Menu:
<code "1">
abc :run "abc.exe" * icon.ico
abc :run "abc.exe" * icon.ico
</code>
TS menu:
<code "2">
abc :key "abc"
abc :key "abc"
</code>
<_> Text with <b>tags</b> that are <u>ignored</u>. </_>