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 QM status bar These comments, including the 'function...' line, is function's help section. It ends with an empty line followed 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 create help section, you can use: code 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.
Certain text lines in the help section can be used for text formatting. To display colored code, bold/italic headings, etc.
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.
Example: Errors: <>, <Func1>, <Func2> |
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: code toolbar -> More tools -> Function help editor. Tags are replaced with links, colors etc when the function help is displayed in the Tips pane, for example when you press F1 in a macro when the text cursor is on that function name.
QM 2.3.0. Tags also can be used with out, if 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.
Syntax for most tags: <tag>text</tag>, or <tag "attribute">text</tag>, or <tag "attribute /more info">text</tag>.
Attributes can contain QM escape sequences. For example, use two ' for ". If single word, can be without quotes (QM 2.4.1).
<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.
<open "MyMacro:Sub">open MyMacro and go to sub-function Sub</open> QM 2.4.1.
<help "::/qm_help/IDH_QUICK.html">open a topic in QM Help</help>
<help "#IDH_QUICK">open a topic in QM Help</help> QM 2.4.1
<help "#IDP_QMDLL#PerfOut">with anchor</help> QM 2.4.1
<help "qm2help.chm">open help file qm2help.chm</help>
<help "qm2help.chm::/qm_help/IDH_QUICK.html>main">open a topic in a help file, "main" window type</help>
<help>MyFunction</help> QM 2.3.3. Shows function help. Read more below.
<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.
<mes "text">show message box</mes> QM 2.3.4
<out "text">show text in QM output</out> QM 2.3.4
Instead of <tag "attribute">text</tag> can be <tag>text</tag>. Then text is used as attribute. Example:
<link>http://www.quickmacros.com</link>
QM 2.3.2. Instead of <tip "#MyMacro">MyMacro</tip> can be <tip>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>
<c 0x8000>nested<c 0xff0000>tags</c>again</c>
<z "0xff">red background</z> QM 2.3.3
<Z "0xff">red background full line</Z> QM 2.3.3
<hidden>cannot see this, but can copy or get with scintilla API</hidden> QM 2.4.1
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>
Autotext list:
<code "2">
abc :key "abc"
abc :key "abc"
</code>
Images are displayed below the text line containing image tags.
<image "resource:<My Macro>image:Name"></image> image from macro resources
<image "resource:<>image:Name"></image> image from file resources
<image "image:Name"></image> the same as above
<image "c:\planets\venus.bmp"></image> image file. Can be bmp, png, jpg, gif.
<image "$my qm$\small.ico"></image> 16x16 icon
<image "&big.ico"></image> 32x32 icon in $my qm$ folder
<image "$system$\shell32.dll,5"></image> icon in a dll, exe or icl file
<image "c:\MyArrow.cur"></image> 32x32 cursor. Can be cur, ani.
<image "c:\file.html"></image> shell icon of any file
<image "resource:<My Macro>Name.png"></image> Can be bmp, png, jpg, gif, ico, cur, ani.
You can add image files to macro resources with _qmfile.ResourceAdd. Adds to file resources if the first argument is 0.
<_> Text with <b>tags</b> that are <u>ignored</u>. </_>
The word for which pressed F1. Only in API help search links:
<keyword>
<macro "MyMacro /<keyword>">run macro MyMacro; the _command variable will contain the F1 word</macro>