getMacroName: Difference between revisions
Jump to navigation
Jump to search
(Updated to reflect current behavior.) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=getMacroName | |||
|version=1.3b48 | |||
|description= | |||
Returns the label/name of the macro being executed. If this macro function is run directly from chat, then this function will return "chat". | |||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getMacroName() | |||
</source> | </source> | ||
|examples= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: macroName = getMacroName()] | [h: macroName = getMacroName()] | ||
[if(macroName == "chat", "You are running from chat", "You are running the macro called " + macroName)] | [if(macroName == "chat", "You are running from chat", "You are running the macro called " + macroName)] | ||
</source> | </source> | ||
}} | |||
[[Category:Metamacro Function]] |
Revision as of 17:16, 7 April 2020
getMacroName() Function
• Introduced in version 1.3b48
Returns the label/name of the macro being executed. If this macro function is run directly from chat, then this function will return "chat".
Usage
getMacroName()
Examples
[h: macroName = getMacroName()]
[if(macroName == "chat", "You are running from chat", "You are running the macro called " + macroName)]