getMacroLocation: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Macros:Functions:getMacroLocation moved to getMacroLocation) |
Verisimilar (talk | contribs) m (Added version.) |
||
Line 1: | Line 1: | ||
{{MacroFunction | {{MacroFunction | ||
|name=getMacroLocation | |name=getMacroLocation | ||
|version=1.3b48 | |||
|description=Returns the location 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". | |description=Returns the location 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". | ||
|usage= | |usage= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
getMacroLocation() | |||
</source> | </source> | ||
Revision as of 12:53, 10 March 2009
getMacroLocation() Function
• Introduced in version 1.3b48
Returns the location 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
getMacroLocation()
Example
[h: libToken = getMacroLocation()]
[if(libToken == "chat", "You are running from chat", "You are running from library token " + libToken)]