Template:Run-once

From OpenKore Wiki
Revision as of 19:59, 3 July 2019 by 4epT (talk | contribs) (Created page with " <noinclude>This template describes the '''run-once''' parameter of the automacro eventMacros.</noinclude> ; run-once :* '''run-once''' is an optiona...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This template describes the run-once parameter of the automacro eventMacros.
run-once
  • 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 myautomacro {
    <automacro conditions and parameters (and only them)>
    run-once 1
    call myMacro
}
automacro myaotherauto {
    <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 myautomacro only once
    log but this macro can be called by myaotherauto many times
}