getMacroLocation

From RPTools Wiki
Jump to navigation Jump to search

Function getMacroLocation

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

[h: libToken = getMacroLocation()]

Examples

[h: libToken = getMacroLocation()]
[if(libToken == "chat", "You are running from chat", "You are running from library token " + libToken)]