RPTools

Personal tools
From MapToolDoc

setMacroCommand

Contents

setMacroCommand() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b48

Sets the command that will be run when the Macro Button is pressed. Note because of the way the parser interprets values within [] you may have to use the encode() and decode() functions with the string.

Usage

  1. setMacroCommand(index, command)
  1. setMacroCommand(index, command, id)

Parameters

  • index - The index of the macro button.
  • command - A string containing the command to set on the macro button.
  • id - The token id of the token that the command is set on.

Examples

  1. [h: setMacroCommand(1, "[macro('Test@Lib:Test'): '']")]

Version Changes

  • 1.3b49 - Changed to a trusted function.
  • 1.3b51 - Added id parameter option.