getMacroName

From RPTools Wiki
Revision as of 22:33, 1 December 2008 by Craig (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function getMacroName

 Note: This refers to a proposed change that has not been implemented in the main code base yet.

Returns the name of the macro being executed via [macro():] . If the macro typed into chat, run by clicking on a macro button, or run via the token popup menu then this function will return "chat".

Usage

[h: macroName = getMacroName()]

Examples

[h: macroName = getMacroName()]
[if(macroName == "chat", "You are running from chat", "You are running the macro called " + macroName)]