grandMA3 User Manual Publication

Variable Functions

grandMA3 User Manual » Plugins » Variable Functions
Version 2.1

This topic is not about local variables in Lua plugins. This is about interactions with variables outside the plugins. For instance, the same user and global variables can be used in macros and the regular command line. Read more about these in the Variables topic in the Macro section.

There are two different sets of variables.

The sets are:

  • UserVars() - These are the variables stored as User variables.
  • GlobalVars() - These are the variabels stored as Global variabels.

There are three functions regarding interaction with variables in a set:

  • GetVar() - Gets the value from a specific variable in one of the sets.
  • SetVar() - Sets a value in a specific variable in one of the sets. This also creates the variable if it does not exist.
  • DelVar() - Deletes a specific variable in a set of variables.

Common for the three functions is a need to know the variable's name. The user and global variables can be listed using the GetUserVariable and GetGlobalVariable keywords combined with an asterisk wildcard.