From MapToolDoc
Jump to: navigation, search

getMacroLocation() Function

Introduced in version 1.3b48

Returns the location of the macro being executed, the return value will be "chat", "global", "campaign" or the label of the token the macro resides on (e.g. "Lib:Utilities" or "Token:Orc".) Standard PC and NPC tokens will have their label prefixed with Token:.


  1. getMacroLocation()


  1. [h: MacroLocation = getMacroLocation()]
  2. [if(MacroLocation == "chat", "You are running from chat", "You are running from "+MacroLocation]

Version Changes

  • 1.3b51 - Now accurately reports where the macro button resides.