commands:macro_node_commands:node_macroload
node_macroload: <name> | <trigger> | <file path> | <replacements> | forceload
Loads a macro on to a node from a text file - useful when you have large, complex macros! Note that if this macro already exists, it will be cleared, and then the file will be loaded onto it. As it is anticipated that the same macro will often be loaded across multiple nodes with only small changes (hence the replacements field), the file is cached in memory - if the file is being edited regularly, using the forceload
tag at the top of a series of calls to this command forces it to be reloaded from disk.
- name is the name of the node to create the Macro on
- trigger is the incoming trigger that should trigger the Macro
- file path is the path to the text file - Wintermute trys this both as an absolute path and as a path relative to the local AppData directory.
- replacements is an optional field containing a list of comma separated equalities to be run over the file as a search/replace - so, if the replacement field contained:
foo1=bar1, foo2=bar2
, all instances of foo1 would be replaced by bar1, and all instances of foo2 by bar2. - forceload is a tag that, if present, forces the file to be reloaded from disk, rather than taking advantage of caching.
Some notes on how the file is parsed
- Each line is treated as a command
- If the line starts with a forward slash -
/
- it is ignored as a comment - If the line starts with an integer in square brackets, e.g.:
[2500] command:
- the macro command is given this delay in milliseconds
commands/macro_node_commands/node_macroload.txt · Last modified: by 127.0.0.1