Template:Run-once: Difference between revisions
Jump to navigation
Jump to search
(Created page with " <noinclude>This template describes the '''run-once''' parameter of the automacro eventMacros.</noinclude> ; run-once :* '''run-once''' is an optiona...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>This template describes the '''run-once''' [[EventMacro#Parameters|parameter]] of the automacro eventMacros.</noinclude> | <noinclude>This template describes the '''run-once''' [[EventMacro#Parameters|parameter]] of the automacro eventMacros.</noinclude> | ||
; run-once | ; run-once <[[boolean]]> | ||
:* '''run-once''' is an optional parameter. | :* '''run-once''' is an optional parameter. | ||
:* '''run-once''' defines if the automacro can activate only once, or multiple times. | :* '''run-once''' defines if the automacro can activate only once, or multiple times. | ||
Line 7: | Line 7: | ||
:* To make an automacro with run-once value of 1 which already was already activated be able to run again you can use the command 'release' [[eventMacro#Macro Syntax|Macro Syntax]]. | :* To make an automacro with run-once value of 1 which already was already activated be able to run again you can use the command 'release' [[eventMacro#Macro Syntax|Macro Syntax]]. | ||
automacro | automacro MyAuto1 { | ||
<automacro conditions and parameters (and only them)> | <automacro conditions and parameters (and only them)> | ||
run-once 1 | run-once 1 | ||
call myMacro | call myMacro | ||
} | } | ||
automacro | automacro MyAuto2 { | ||
<automacro conditions and parameters (and only them)> | <automacro conditions and parameters (and only them)> | ||
run-once 0 | run-once 0 | ||
Line 19: | Line 19: | ||
macro myMacro { | macro myMacro { | ||
<macro instructions (and only them, as this is regular macro)> | <macro instructions (and only them, as this is regular macro)> | ||
log This macro will be called by | log This macro will be called by MyAuto1 only once | ||
log but this macro can be called by | log but this macro can be called by MyAuto2 many times | ||
} | } |
Latest revision as of 20:38, 18 October 2020
This template describes the run-once parameter of the automacro eventMacros.
- run-once <boolean>
-
- run-once is an optional parameter.
- run-once defines if the automacro can activate only once, or multiple times.
- If not used in the automacro the default value will be used, which is: 0.
- When it's value is 1 the automacro will only activate once, when it's 0 it can activate multiple times.
- To make an automacro with run-once value of 1 which already was already activated be able to run again you can use the command 'release' Macro Syntax.
automacro MyAuto1 { <automacro conditions and parameters (and only them)> run-once 1 call myMacro } automacro MyAuto2 { <automacro conditions and parameters (and only them)> run-once 0 call myMacro } macro myMacro { <macro instructions (and only them, as this is regular macro)> log This macro will be called by MyAuto1 only once log but this macro can be called by MyAuto2 many times }