getMacroName

From MapToolDoc
Jump to: navigation, search

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

  1. getMacroName()

Examples

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