getMacroContext: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page GetMacroContext to getMacroContext: Converting page titles to lowercase)
No edit summary
Line 6: Line 6:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getMacroContext()
getMacroContext()
</source>
</syntaxhighlight>


|example=
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: getMacroContext()]
[r: getMacroContext()]
</source>
</syntaxhighlight>


Returns for example:
Returns for example:

Revision as of 17:53, 14 March 2023

getMacroContext() Function

Introduced in version 1.4.0.2
Returns information about the source, name, index of the button of the macro being executed as a JSON object.

Usage

getMacroContext()

Example

[r: getMacroContext()]

Returns for example:

{"stackSize":1,"trusted":true,"name":"aMacroName","buttonIndex":127,"source":"lib:Test"}