Get macro text or other property

Syntax

s.getmacro([macro] [what])

 

Parameters

s - str variable.

macro - QM item name (full, case insensitive) or id (integer).

what - what to get:

0 text.
1 name. See also getopt itemname.
2 trigger. It is encoded trigger string. It consists of trigger (possibly with escape sequences), programs and trigger filter function. To get parsed components or description, use qmitem.
3-8

obsolete, use qmitem instead.

3 type. s will be "0" if the item is macro, "1" if function, "2" if menu, "3" if toolbar, "4" if T. S. menu, "5" if folder, "6" if member function, "7" if file link.
4 disabled state. s will be "1" if the item is disabled, or "0" if not.
5 encrypted state. s will be "1" if the item is encrypted, or "0" if not.
6 shared state. s will be "1" if the item is in a shared folder, or "0" if not.
7 id.
8 read-only state. s will be "0" if the item is not read-only, "2" if the item is encrypted, "1" if the item is in read-only folder and not encrypted.

 

Remarks

Gets QM item text or some other property.

 

Error if macro is invalid at run time.

 

Some features not available in exe.

 

Examples

str s ss
s.getmacro("Untitled")
ss.getmacro("\Folder\Macro")

int i = qmitem("Untitled")
_s.getmacro(i)