MACRO script

From Wowpedia
Jump to: navigation, search

Executes the provided Lua code.

/script code

You can also use /run.

Arguments

code 
A block of LUA code to execute. This must all be one line before the LF character.

Notes

  • The code may not contain any line breaks (i.e. you should not press Enter while writing the code). In some cases, it may be necessary to insert semicolons between Lua statements.
  • Any local variables defined in the code block will be destroyed after the code is processed. It is recommended you use local variables unless you need to pass the information elsewhere or just flat run out of room. You may still access variables in the global environment.
  • This command will not let you bypass LUA scripting limitations or UI restrictions.
  • The LUA code is processed separately from macro text. You cannot use LUA code to do things like insert a condition into your macro.