getMacroName: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function getMacroName== {{ProposedChange}} Returns the name of the macro being executed via [macro():] . If the macro typed into chat, run by clicking on a [[macro...) |
No edit summary |
||
(10 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=getMacroName | |||
Returns the name of the macro being executed | |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= | |||
< | <syntaxhighlight lang="mtmacro" line> | ||
getMacroName() | |||
</ | </syntaxhighlight> | ||
|examples= | |||
< | <syntaxhighlight 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)] | ||
</ | </syntaxhighlight> | ||
}} | |||
[[Category:Metamacro Function]] |
Latest revision as of 23:59, 14 March 2023
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)]