getMacroName: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
m (Fixing wikilinks)
Line 3: Line 3:
|version=1.3b48
|version=1.3b48
|description=
|description=
Returns the name of the macro being executed via [[Macro:Roll:macro | [macro():] ]]. If the macro typed into chat, run by clicking on a [[macro button]], or run via the [[Token:popup menu| token popup menu]] then this function will return "chat".
Returns the name of the macro being executed via [[macro_(roll_option)| [macro():] ]]. If the macro typed into chat, run by clicking on a [[Macro_Button|macro button]], or run via the [[Token:popup menu| token popup menu]] then this function will return "chat".


|usage=
|usage=

Revision as of 15:18, 19 July 2011

getMacroName() Function

Introduced in version 1.3b48
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

getMacroName()

Examples

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